This commit is contained in:
Marco 2025-03-11 10:48:15 +01:00
commit b5315904f4
6 changed files with 96 additions and 97 deletions

View file

@ -17,7 +17,8 @@ public partial class NPC : Area2D, IInteractable
_scriptable = new ScriptableBase();
_scriptable.Events = Events;
this.CallDeferred("add_child", _scriptable);
// Add as sibling so relative paths still work
GetParent().CallDeferred("add_child", _scriptable);
}
public bool Activate(ActivationType activationType = ActivationType.Toggle)

View file

@ -44,7 +44,6 @@ public partial class ScriptableBase : Node2D, IActivable
if (!CurrentEvent.WaitForCompletion || CurrentEvent.IsComplete())
{
// This loops
//_currentEventIndex = (_currentEventIndex + 1) % Events.Count;
_currentEventIndex++;
if (_currentEventIndex >= Events.Count)
{
@ -56,12 +55,6 @@ public partial class ScriptableBase : Node2D, IActivable
CurrentEvent.Start(this);
}
// if (_currentHealth <= CurrentPhase.Threshold && currentPhaseIndex + 1 < Phases.Count)
// {
// currentPhaseIndex++;
// _bossHud.SpellCardName = CurrentPhase.PhaseName;
// StartPhase(CurrentPhase);
// }
}
public bool Activate(ActivationType activationType = ActivationType.Toggle)