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

@ -7,18 +7,16 @@ public partial class Dead : EnemyStateBase
{
public override EnemyState StateId => EnemyState.Dead;
[Export]
public EnemyStorageModule StorageModule { get; private set; }
private EnemyStorageModule StorageModule { get; set; }
[Export]
public EnemyDropsProvider DropsProvider { get; private set; }
private EnemyDropsProvider DropsProvider { get; set; }
// public override void Init(IStateMachine<EnemyState, CharacterBody2D> machine)
// {
// base.Init(machine);
//
//
// }
public override void Init(IStateMachine<EnemyState, CharacterBody2D> machine)
{
base.Init(machine);
StorageModule ??= StateMachine.GetModule<EnemyStorageModule>();
DropsProvider ??= StateMachine.GetModule<EnemyDropsProvider>();
}
public override void EnterState()
{