mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Refactored switches and chests and mapping
This commit is contained in:
parent
295d32e66d
commit
cc5376e94e
14 changed files with 158 additions and 91 deletions
16
Scripts/Interactables/Switch.cs
Normal file
16
Scripts/Interactables/Switch.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Interactables;
|
||||
|
||||
public partial class Switch : Interactable
|
||||
{
|
||||
[Export] public Activable Target { get; set; }
|
||||
|
||||
public override void Activate()
|
||||
{
|
||||
if (MeetsRequirements())
|
||||
{
|
||||
Target?.Activate();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue