diff --git a/Assets/Fungus/Tests/Sequence/SequenceTest.unity b/Assets/Fungus/Tests/Sequence/SequenceTest.unity index cedfc0e9..6bb4f838 100644 Binary files a/Assets/Fungus/Tests/Sequence/SequenceTest.unity and b/Assets/Fungus/Tests/Sequence/SequenceTest.unity differ diff --git a/Assets/Fungus/VisualScripting/ExecuteCommand.cs b/Assets/Fungus/VisualScripting/ExecuteCommand.cs index 4ae7c828..770dd826 100644 --- a/Assets/Fungus/VisualScripting/ExecuteCommand.cs +++ b/Assets/Fungus/VisualScripting/ExecuteCommand.cs @@ -10,7 +10,7 @@ namespace Fungus { public Sequence targetSequence; - public override void OnExecute() + public override void OnEnter() { if (targetSequence == null) { diff --git a/Assets/Fungus/VisualScripting/FungusCommand.cs b/Assets/Fungus/VisualScripting/FungusCommand.cs index 3375019f..bac61cd0 100644 --- a/Assets/Fungus/VisualScripting/FungusCommand.cs +++ b/Assets/Fungus/VisualScripting/FungusCommand.cs @@ -48,10 +48,9 @@ namespace Fungus public virtual void Execute() { OnEnter(); - OnExecute(); } - public virtual void ExecuteNextCommand() + public virtual void Finish() { OnExit(); parentSequence.ExecuteNextCommand(this); @@ -70,9 +69,6 @@ namespace Fungus public virtual void OnExit() {} - public virtual void OnExecute() - {} - public virtual void GetConnectedSequences(ref List connectedSequences) {} } diff --git a/Assets/Fungus/VisualScripting/IfBooleanCommand.cs b/Assets/Fungus/VisualScripting/IfBooleanCommand.cs index 71a9d2c8..e23c7814 100644 --- a/Assets/Fungus/VisualScripting/IfBooleanCommand.cs +++ b/Assets/Fungus/VisualScripting/IfBooleanCommand.cs @@ -13,7 +13,7 @@ namespace Fungus public Sequence trueSequence; public Sequence falseSequence; - public override void OnExecute() + public override void OnEnter() { if (Variables.GetBoolean(key)) { diff --git a/Assets/Fungus/VisualScripting/SayCommand.cs b/Assets/Fungus/VisualScripting/SayCommand.cs index 9aa97f57..6ae307f4 100644 --- a/Assets/Fungus/VisualScripting/SayCommand.cs +++ b/Assets/Fungus/VisualScripting/SayCommand.cs @@ -12,7 +12,7 @@ namespace Fungus public List options = new List(); - public override void OnExecute() + public override void OnEnter() { Dialog dialog = Game.GetInstance().dialog; @@ -26,7 +26,7 @@ namespace Fungus } dialog.Say (text, delegate { - ExecuteNextCommand(); + Finish(); }); } diff --git a/Assets/Fungus/VisualScripting/SetBooleanCommand.cs b/Assets/Fungus/VisualScripting/SetBooleanCommand.cs index 29e0016e..147e8375 100644 --- a/Assets/Fungus/VisualScripting/SetBooleanCommand.cs +++ b/Assets/Fungus/VisualScripting/SetBooleanCommand.cs @@ -12,10 +12,10 @@ namespace Fungus public bool value; - public override void OnExecute() + public override void OnEnter() { Variables.SetBoolean(key, value); - ExecuteNextCommand(); + Finish(); } } diff --git a/Assets/Fungus/VisualScripting/WaitCommand.cs b/Assets/Fungus/VisualScripting/WaitCommand.cs index 10c7d198..dc91517d 100644 --- a/Assets/Fungus/VisualScripting/WaitCommand.cs +++ b/Assets/Fungus/VisualScripting/WaitCommand.cs @@ -10,14 +10,14 @@ namespace Fungus { public float duration; - public override void OnExecute() + public override void OnEnter() { Invoke ("OnWaitComplete", duration); } void OnWaitComplete() { - ExecuteNextCommand(); + Finish(); } }