Changed player to new one

This commit is contained in:
Marco 2025-03-02 11:58:30 +01:00
commit 1c1436a539
27 changed files with 323 additions and 87 deletions

View file

@ -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));