Map Triggers

This commit is contained in:
Marco 2025-06-18 11:33:27 +02:00
commit 054c0998ad
34 changed files with 5896 additions and 477 deletions

View file

@ -2,6 +2,7 @@
namespace Cirno.Scripts.Actors;
[Tool]
public partial class Elevator3D : PathFollow3D, IActivable
{
[Export] public float Speed { get; set; }
@ -11,6 +12,7 @@ public partial class Elevator3D : PathFollow3D, IActivable
public override void _Process(double delta)
{
if (Engine.IsEditorHint()) return;
if (!_isMoving) return;
ProgressRatio += (Speed * (float)delta) * _multiplier;
@ -24,12 +26,18 @@ public partial class Elevator3D : PathFollow3D, IActivable
public bool Activate(ActivationType activationType = ActivationType.Toggle)
{
if (Engine.IsEditorHint()) return false;
if (_isMoving) return false;
StartMoving();
return true;
}
public void Toggle()
{
this.Activate();
}
public void StartMoving()
{