mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 09:35:34 +00:00
21 lines
No EOL
661 B
C#
21 lines
No EOL
661 B
C#
using Godot;
|
|
|
|
namespace Cirno.Scripts.Components.FSM;
|
|
|
|
public abstract partial class PlayerArea2DModule : Area2D, IModule<PlayerState, CharacterBody2D>
|
|
{
|
|
public IStateMachine<PlayerState, CharacterBody2D> StateMachine { get; private set; }
|
|
|
|
public CharacterBody2D CharacterBody => StateMachine.MainObject;
|
|
|
|
|
|
public abstract void EnterState(PlayerState state);
|
|
public abstract void ExitState(PlayerState state);
|
|
|
|
public virtual void Init(IStateMachine<PlayerState, CharacterBody2D> machine)
|
|
{
|
|
StateMachine = machine;
|
|
}
|
|
public abstract void Process(double delta);
|
|
public abstract void PhysicsProcess(double delta);
|
|
} |