mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-12 19:05:54 +00:00
Destructible triggers
This commit is contained in:
parent
f013987bab
commit
7aee230b3c
56 changed files with 1457 additions and 1106 deletions
|
|
@ -2,6 +2,7 @@ using Godot;
|
|||
using System;
|
||||
using Cirno.Scripts;
|
||||
using Cirno.Scripts.Components.FSM._3DPlayer;
|
||||
using Cirno.Scripts.Utils;
|
||||
using Godot.Collections;
|
||||
|
||||
[Tool]
|
||||
|
|
@ -68,23 +69,8 @@ public partial class TriggerArea : Area3D
|
|||
_triggerState = TriggerStates.USED;
|
||||
ToggleCollision(false);
|
||||
|
||||
UseTargets(this, Target);
|
||||
}
|
||||
}
|
||||
|
||||
private void UseTargets(Node activator, string target)
|
||||
{
|
||||
GD.Print($"Trying to use targets called: {target}");
|
||||
var targetList = 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.Activate(ActivationType);
|
||||
}
|
||||
ActivationHelper.UseTargets(this, Target, ActivationType);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue