25 lines
745 B
C#
25 lines
745 B
C#
namespace OnlyScove.Scripts
|
|
{
|
|
public abstract class PlayerBaseState
|
|
{
|
|
protected PlayerStateMachine stateMachine;
|
|
|
|
// Constructor to pass the state machine reference
|
|
public PlayerBaseState(PlayerStateMachine stateMachine)
|
|
{
|
|
this.stateMachine = stateMachine;
|
|
}
|
|
|
|
// Called once when entering the state
|
|
public abstract void Enter();
|
|
|
|
// Called every frame (equivalent to Update)
|
|
public abstract void Tick(float deltaTime);
|
|
|
|
// Called every physics frame (equivalent to FixedUpdate)
|
|
public abstract void PhysicsTick(float fixedDeltaTime);
|
|
|
|
// Called once before switching to a new state
|
|
public abstract void Exit();
|
|
}
|
|
} |