mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-16 20:03:47 +00:00
Add FSM components for player and enemy state management, including initialization and module resolution
This commit is contained in:
parent
18683c0680
commit
b6cc5a00e8
57 changed files with 526 additions and 506 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue