cirnogodot/Scripts/Interactables/Switch.cs

19 lines
336 B
C#
Raw Normal View History

using Godot;
namespace Cirno.Scripts.Interactables;
public partial class Switch : Interactable
{
[Export] public Activable Target { get; set; }
2025-01-30 17:43:39 +01:00
public override bool Activate()
{
if (MeetsRequirements())
{
Target?.Activate();
2025-01-30 17:43:39 +01:00
return true;
}
2025-01-30 17:43:39 +01:00
return false;
}
}