Add new components: CannotStompComponent, SkillUnlockedComponent, SpaceshipEnterComponent, SpaceshipExitComponent, SpinComponent, StompDamageComponent, StraightMotionComponent, TerrainHitFx, TooltipComponent, TrailComponent, and UnlockOnRequirementComponent

This commit is contained in:
2025-08-12 12:19:18 +02:00
parent ef4d128869
commit dfa8a17ba1
13 changed files with 332 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
using Godot;
namespace Mr.BrickAdventures.scripts.components;
public partial class SpaceshipEnterComponent : Node
{
[Export] public Area2D Area { get; set; }
[Signal] public delegate void SpaceshipEnteredEventHandler();
public override void _Ready()
{
Area.BodyEntered += OnBodyEntered;
}
private void OnBodyEntered(Node2D body)
{
if (body is not PlayerController) return;
EmitSignalSpaceshipEntered();
Owner.QueueFree();
}
}