Browse Source

Renamed activeSequence to executingSequence

master
chrisgregan 11 years ago
parent
commit
0d34ef00d1
  1. 2
      Assets/Fungus/Editor/FungusScript/FungusEditorWindow.cs
  2. 5
      Assets/Fungus/VisualScripting/FungusScript.cs
  3. 6
      Assets/Fungus/VisualScripting/Sequence.cs

2
Assets/Fungus/Editor/FungusScript/FungusEditorWindow.cs

@ -129,7 +129,7 @@ namespace Fungus.Script
string labelText = fungusScript.name; string labelText = fungusScript.name;
if (Application.isPlaying) if (Application.isPlaying)
{ {
if (fungusScript.activeSequence == null) if (fungusScript.executingSequence == null)
{ {
GUI.backgroundColor = Color.white; GUI.backgroundColor = Color.white;
labelText += " (Idle)"; labelText += " (Idle)";

5
Assets/Fungus/VisualScripting/FungusScript.cs

@ -16,12 +16,13 @@ namespace Fungus.Script
public Sequence startSequence; public Sequence startSequence;
[System.NonSerialized] [System.NonSerialized]
public Sequence activeSequence; public Sequence executingSequence;
public bool startAutomatically = false; public bool startAutomatically = false;
public List<FungusVariable> variables = new List<FungusVariable>(); public List<FungusVariable> variables = new List<FungusVariable>();
void Start() void Start()
{ {
if (startAutomatically) if (startAutomatically)
@ -51,7 +52,7 @@ namespace Fungus.Script
Selection.activeGameObject = sequence.gameObject; Selection.activeGameObject = sequence.gameObject;
#endif #endif
activeSequence = sequence; executingSequence = sequence;
sequence.ExecuteNextCommand(); sequence.ExecuteNextCommand();
} }
} }

6
Assets/Fungus/VisualScripting/Sequence.cs

@ -63,12 +63,12 @@ namespace Fungus.Script
public bool IsRunning() public bool IsRunning()
{ {
if (fungusScript == null || if (fungusScript == null ||
fungusScript.activeSequence == null) fungusScript.executingSequence == null)
{ {
return false; return false;
} }
return (fungusScript.activeSequence == this); return (fungusScript.executingSequence == this);
} }
public int GetExecutionCount() public int GetExecutionCount()
@ -130,7 +130,7 @@ namespace Fungus.Script
public void Stop() public void Stop()
{ {
activeCommand = null; activeCommand = null;
fungusScript.activeSequence = null; fungusScript.executingSequence = null;
// No more commands to run in current sequence // No more commands to run in current sequence
#if UNITY_EDITOR #if UNITY_EDITOR

Loading…
Cancel
Save