mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
41 lines
No EOL
884 B
C#
41 lines
No EOL
884 B
C#
using Godot;
|
|
|
|
namespace Cirno.Scripts.Resources.Events;
|
|
|
|
[GlobalClass]
|
|
public partial class ControlActorEvent : EventResource
|
|
{
|
|
[Export]
|
|
public NodePath Target { get; set; }
|
|
|
|
private Node _parent;
|
|
|
|
private bool _isComplete = false;
|
|
public override bool IsComplete()
|
|
{
|
|
return _isComplete;
|
|
}
|
|
|
|
public override void Init(Node parent)
|
|
{
|
|
_parent = parent;
|
|
}
|
|
|
|
public override void Start(Node parentNode)
|
|
{
|
|
_isComplete = false;
|
|
|
|
if (_parent.GetNode<Node2D>(Target) is Actor enemy)
|
|
{
|
|
// TODO: Restore control
|
|
// if (GameManager.Instance.ToggleControlMode() is GameState.Controlling)
|
|
// {
|
|
// enemy.AssumeControl();
|
|
// }
|
|
}
|
|
|
|
_isComplete = true;
|
|
}
|
|
|
|
public override void UpdateEvent(double delta) { }
|
|
} |