mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 15:35:54 +00:00
Teleport animation
This commit is contained in:
parent
2ce91362b7
commit
4a8ac7a495
8 changed files with 269 additions and 5 deletions
|
|
@ -19,6 +19,8 @@ public partial class LevelTeleporter : Teleporter
|
|||
|
||||
_particles.Emitting = true;
|
||||
|
||||
await player.Teleport();
|
||||
|
||||
await Task.Delay((int)(TeleportAnimationLength * 1000));
|
||||
|
||||
GlobalState.Instance.GotoScene(LevelPath);
|
||||
|
|
|
|||
|
|
@ -131,12 +131,17 @@ public partial class Teleporter : Activable
|
|||
|
||||
await TweenPlayer(player);
|
||||
|
||||
Target.PrepareForReceiving();
|
||||
|
||||
_particles.Emitting = true;
|
||||
|
||||
await player.Teleport();
|
||||
|
||||
await Task.Delay((int)(TeleportAnimationLength * 1000));
|
||||
|
||||
Target.PrepareForReceiving();
|
||||
player.GlobalPosition = Target.GlobalPosition + TeleportOffset;
|
||||
|
||||
await player.UnTeleport();
|
||||
|
||||
player.RequestMovementDisable(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue