mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
22 lines
No EOL
585 B
C#
22 lines
No EOL
585 B
C#
using Godot;
|
|
|
|
namespace Cirno.Scripts.Utils;
|
|
|
|
public static class ActivationHelper
|
|
{
|
|
public static void UseTargets(Node activator, string target)
|
|
{
|
|
GD.Print($"Trying to use targets called: {target}");
|
|
var targetList = activator.GetTree().GetNodesInGroup(target);
|
|
foreach (var t in targetList)
|
|
{
|
|
//string f;
|
|
GD.Print($"Trying to use {t.Name}");
|
|
if (t is IActivable activable)
|
|
{
|
|
GD.Print($"Activating {t.Name}");
|
|
activable.Toggle();
|
|
}
|
|
}
|
|
}
|
|
} |