mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Marisa bullets
This commit is contained in:
parent
369841217e
commit
f2e6025b35
17 changed files with 227 additions and 6 deletions
|
|
@ -4,13 +4,14 @@ namespace Cirno.Scripts.Interactables;
|
|||
|
||||
public partial class Switch : Interactable
|
||||
{
|
||||
[Export] public Activable Target { get; set; }
|
||||
[Export] public Node2D Target { get; set; }
|
||||
[Export] public ActivationType ActivationType { get; set; } = ActivationType.Toggle;
|
||||
|
||||
public override bool Activate()
|
||||
{
|
||||
if (MeetsRequirements())
|
||||
if (MeetsRequirements() && Target is IActivable activable)
|
||||
{
|
||||
Target?.Activate();
|
||||
activable?.Activate(ActivationType);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue