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;
if (Application.isPlaying)
{
if (fungusScript.activeSequence == null)
if (fungusScript.executingSequence == null)
{
GUI.backgroundColor = Color.white;
labelText += " (Idle)";

5
Assets/Fungus/VisualScripting/FungusScript.cs

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

6
Assets/Fungus/VisualScripting/Sequence.cs

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

Loading…
Cancel
Save