mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 07:45:54 +00:00
Changed player to new one
This commit is contained in:
parent
60ab375572
commit
1c1436a539
27 changed files with 323 additions and 87 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Threading.Tasks;
|
||||
using Cirno.Scripts.Components.FSM;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Activables;
|
||||
|
|
@ -10,16 +11,19 @@ public partial class LevelTeleporter : Teleporter
|
|||
[Export]
|
||||
public string LevelPath {get; private set;}
|
||||
|
||||
protected override async Task Teleport(PlayerMovement player)
|
||||
protected override async Task Teleport(PlayerStateMachine player)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(LevelPath)) return;
|
||||
player.RequestMovementDisable(true);
|
||||
//player.RequestMovementDisable(true);
|
||||
player.SetState((int)PlayerState.Cutscene);
|
||||
|
||||
await TweenPlayer(player);
|
||||
|
||||
_particles.Emitting = true;
|
||||
|
||||
await player.Teleport();
|
||||
//await player.Teleport();
|
||||
player.SetState((int)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