mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 15:25:55 +00:00
Elevator top body
This commit is contained in:
parent
2ec5671bc2
commit
c8cd4ffb1d
10 changed files with 84 additions and 33 deletions
|
|
@ -7,27 +7,27 @@ namespace Cirno.Scripts.Components.FSM.Elevator;
|
|||
|
||||
public partial class ElevatorProxy : Area2D, IActivable
|
||||
{
|
||||
[Export]
|
||||
public ElevatorState StartingState { get; protected set; } = ElevatorState.Bottom;
|
||||
|
||||
[Export]
|
||||
public float MovementTime { get; protected set; } = 1.0f;
|
||||
|
||||
[Export]
|
||||
public Path2D ElevatorPath { get; protected set; }
|
||||
|
||||
[Signal] public delegate void ActivatedEventHandler(ActivationType type);
|
||||
|
||||
[Export] public ElevatorState StartingState { get; protected set; } = ElevatorState.Bottom;
|
||||
|
||||
[Export] public float MovementTime { get; protected set; } = 1.0f;
|
||||
|
||||
[Export] public Path2D ElevatorPath { get; protected set; }
|
||||
|
||||
[Export] public CollisionShape2D TopBody { get; protected set; }
|
||||
|
||||
[Signal]
|
||||
public delegate void ActivatedEventHandler(ActivationType type);
|
||||
|
||||
public Vector2 Top => ElevatorPath.Curve.GetPointPosition(0);
|
||||
|
||||
|
||||
public Vector2 Bottom => ElevatorPath.Curve.GetPointPosition(1);
|
||||
|
||||
public IStateMachine<ElevatorState,ElevatorProxy> StateMachine { get; set; }
|
||||
public IStateMachine<ElevatorState, ElevatorProxy> StateMachine { get; set; }
|
||||
// public void SetPosition(Vector2 position)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
public InteractionController CachedPlayer { get; private set; }
|
||||
|
||||
public bool Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
|
|
@ -43,7 +43,7 @@ public partial class ElevatorProxy : Area2D, IActivable
|
|||
CachedPlayer = player;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void _on_area_exited(Area2D area)
|
||||
{
|
||||
if (area is InteractionController player)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue