mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 18:25:54 +00:00
Migrated player state machine
This commit is contained in:
parent
bb3cdefaa2
commit
9c3f22760b
19 changed files with 108 additions and 69 deletions
|
|
@ -11,18 +11,18 @@ public partial class LevelTeleporter : Teleporter
|
|||
[Export]
|
||||
public string LevelPath {get; private set;}
|
||||
|
||||
protected override async Task Teleport(PlayerStateMachine player)
|
||||
protected override async Task Teleport(IStateMachine<PlayerState, CharacterBody2D> player)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(LevelPath)) return;
|
||||
//player.RequestMovementDisable(true);
|
||||
player.SetState((int)PlayerState.Cutscene);
|
||||
player.SetState(PlayerState.Cutscene);
|
||||
|
||||
await TweenPlayer(player);
|
||||
await TweenPlayer(player.MainObject);
|
||||
|
||||
_particles.Emitting = true;
|
||||
|
||||
//await player.Teleport();
|
||||
player.SetState((int)PlayerState.UnTeleporting);
|
||||
player.SetState(PlayerState.UnTeleporting);
|
||||
await Task.Delay((int)(0.6f * 1000));
|
||||
|
||||
await Task.Delay((int)(TeleportAnimationLength * 1000));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue