mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-15 16:13:57 +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,9 +7,14 @@ public partial class Drowning : BaseState<PlayerState, CharacterBody3D>
|
|||
{
|
||||
public override PlayerState StateId => PlayerState.Drowning;
|
||||
|
||||
[Export]
|
||||
private PlayerAnimationProvider3D _animationProvider;
|
||||
|
||||
public override void Init(IStateMachine<PlayerState, CharacterBody3D> machine)
|
||||
{
|
||||
base.Init(machine);
|
||||
_animationProvider ??= StateMachine.GetModule<PlayerAnimationProvider3D>();
|
||||
}
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
_animationProvider.PlayDrowningAnimation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue