mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-12 14:55:53 +00:00
Teleporters
This commit is contained in:
parent
7e76edc153
commit
1907a38575
25 changed files with 616 additions and 4 deletions
46
Scripts/Components/FSM/3DPlayer/Teleporting.cs
Normal file
46
Scripts/Components/FSM/3DPlayer/Teleporting.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using Cirno.Scripts.Components.Actors._3D;
|
||||
using Cirno.Scripts.Components.FSM.Player;
|
||||
using Cirno.Scripts.Utils;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM._3DPlayer;
|
||||
|
||||
public partial class Teleporting : BaseState<PlayerState, CharacterBody3D>
|
||||
{
|
||||
public override PlayerState StateId => PlayerState.Teleporting;
|
||||
|
||||
[Export] public PlayerAnimationProvider3D AnimationProvider { get; set; }
|
||||
|
||||
public override void Init(IStateMachine<PlayerState, CharacterBody3D> machine)
|
||||
{
|
||||
base.Init(machine);
|
||||
}
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
base.EnterState();
|
||||
AnimationProvider.PlayTeleportAnimation();
|
||||
MainObject.Velocity = Vector3.Zero;
|
||||
}
|
||||
|
||||
public override void ExitState()
|
||||
{
|
||||
base.ExitState();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void ProcessState(double delta)
|
||||
{
|
||||
base.ProcessState(delta);
|
||||
|
||||
}
|
||||
|
||||
public override void PhysicsProcessState(double delta)
|
||||
{
|
||||
// Process modules
|
||||
base.PhysicsProcessState(delta);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue