mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 19:25:54 +00:00
Camera triggers
This commit is contained in:
parent
827d4f1914
commit
b0d0161ab0
8 changed files with 1136 additions and 1074 deletions
22
Scripts/Utils/ActivationHelper.cs
Normal file
22
Scripts/Utils/ActivationHelper.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
Scripts/Utils/ActivationHelper.cs.uid
Normal file
1
Scripts/Utils/ActivationHelper.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://yaelg8hdimia
|
||||
Loading…
Add table
Add a link
Reference in a new issue