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 a859ff9fe7
commit 2dc4306be8
13 changed files with 332 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
using Godot;
namespace Mr.BrickAdventures.scripts.components;
public partial class SpinComponent : Node
{
[Export] public float SpinSpeed { get; set; } = 8f;
[Export] public Vector2 SpinDirection { get; set; } = Vector2.Right;
public override void _Process(double delta)
{
Spin((float)delta);
}
private void Spin(float delta)
{
var rotationSpeed = SpinSpeed * SpinDirection.X * delta;
if (Owner is Node2D root)
{
root.Rotation += rotationSpeed;
}
}
}