Add FSM components for player and enemy state management, including initialization and module resolution

This commit is contained in:
MaddoScientisto 2026-02-26 23:13:57 +01:00
commit b6cc5a00e8
57 changed files with 526 additions and 506 deletions

View file

@ -1,40 +0,0 @@
using Cirno.Scripts.Components.Actors;
using Cirno.Scripts.Enums;
using Godot;
namespace Cirno.Scripts.Components.FSM.Enemy;
public partial class Init : EnemyStateBase
{
public override EnemyState StateId => EnemyState.Init;
[Export]
public GenericDamageReceiver DamageReceiver { get; private set; }
[Export]
public EnemyStorageModule StorageModule { get; private set; }
public override void EnterState()
{
DamageReceiver.HealthProvider.MaxResource = StorageModule.Root.EnemyResource.MaxHealth;
StorageModule.AiState = StorageModule.Root.StartingAiState;
StorageModule.HomePosition = MainObject.GlobalPosition;
// TODO: Hide wings
// TODO: Hide aiming reticule
StateMachine.SetState(EnemyState.Idle);
}
public override void PhysicsProcessState(double delta)
{
}
public override void ProcessState(double delta)
{
}
}