2026-02-26 23:13:57 +01:00
|
|
|
|
using Godot;
|
2025-06-10 16:33:43 +02:00
|
|
|
|
|
|
|
|
|
|
namespace Cirno.Scripts.Components.FSM._3DPlayer;
|
|
|
|
|
|
|
|
|
|
|
|
public partial class Init : BaseState<PlayerState, CharacterBody3D>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override PlayerState StateId => PlayerState.Init;
|
|
|
|
|
|
|
|
|
|
|
|
public override void EnterState()
|
|
|
|
|
|
{
|
2026-02-26 23:13:57 +01:00
|
|
|
|
// Use Godot timer instead of Task.Delay to stay on main thread
|
|
|
|
|
|
var timer = GetTree().CreateTimer(0.5f);
|
|
|
|
|
|
timer.Timeout += () => StateMachine.SetState(PlayerState.Active);
|
2025-06-10 16:33:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void ExitState()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void PhysicsProcessState(double delta)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void ProcessState(double delta)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|