mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:35:34 +00:00
NPC Fix
This commit is contained in:
parent
96898ad1cc
commit
b5315904f4
6 changed files with 96 additions and 97 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue