2025-06-27 17:43:15 +02:00
|
|
|
|
using Cirno.Scripts.Components.Actors._3D;
|
|
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Cirno.Scripts.Components.FSM._3DPlayer;
|
|
|
|
|
|
|
|
|
|
|
|
public partial class Teleporting : BaseState<PlayerState, CharacterBody3D>
|
|
|
|
|
|
{
|
|
|
|
|
|
public override PlayerState StateId => PlayerState.Teleporting;
|
|
|
|
|
|
|
2026-02-26 23:13:57 +01:00
|
|
|
|
private PlayerAnimationProvider3D AnimationProvider { get; set; }
|
2025-06-27 17:43:15 +02:00
|
|
|
|
|
|
|
|
|
|
public override void Init(IStateMachine<PlayerState, CharacterBody3D> machine)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Init(machine);
|
2026-02-26 23:13:57 +01:00
|
|
|
|
AnimationProvider ??= StateMachine.GetModule<PlayerAnimationProvider3D>();
|
2025-06-27 17:43:15 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void EnterState()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.EnterState();
|
2026-02-26 23:13:57 +01:00
|
|
|
|
AnimationProvider?.PlayTeleportAnimation();
|
2025-06-27 17:43:15 +02:00
|
|
|
|
MainObject.Velocity = Vector3.Zero;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void ProcessState(double delta)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.ProcessState(delta);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|