mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
20 lines
No EOL
473 B
C#
20 lines
No EOL
473 B
C#
using Godot;
|
|
|
|
namespace Cirno.Scripts.Interactables;
|
|
|
|
public partial class Switch : Interactable
|
|
{
|
|
[Export] public Node2D Target { get; set; }
|
|
[Export] public ActivationType ActivationType { get; set; } = ActivationType.Toggle;
|
|
|
|
public override bool Activate()
|
|
{
|
|
if (MeetsRequirements() && Target is IActivable activable)
|
|
{
|
|
activable?.Activate(ActivationType);
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
} |