diff --git a/Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs b/Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs index af043cde..89e4ffdc 100644 --- a/Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs +++ b/Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs @@ -66,6 +66,11 @@ namespace Fungus } } + public override void OnStopExecuting() + { + CameraController.GetInstance().StopAllCoroutines(); + } + public override string GetSummary() { if (targetView == null) diff --git a/Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs b/Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs index 19da879e..ab2d95e5 100644 --- a/Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs +++ b/Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs @@ -46,6 +46,11 @@ namespace Fungus } } + public override void OnStopExecuting() + { + CameraController.GetInstance().StopAllCoroutines(); + } + public override string GetSummary() { if (targetView == null) diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index 16391e3e..946d7398 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -240,6 +240,7 @@ namespace Fungus // Tell the executing command to stop immediately if (activeCommand != null) { + activeCommand.isExecuting = false; activeCommand.OnStopExecuting(); } diff --git a/Assets/Fungus/Flowchart/Scripts/Command.cs b/Assets/Fungus/Flowchart/Scripts/Command.cs index 9018ef63..6495de0c 100644 --- a/Assets/Fungus/Flowchart/Scripts/Command.cs +++ b/Assets/Fungus/Flowchart/Scripts/Command.cs @@ -83,7 +83,11 @@ namespace Fungus public virtual void Continue() { - Continue(commandIndex + 1); + // This is a noop if the Block has already been stopped + if (isExecuting) + { + Continue(commandIndex + 1); + } } public virtual void Continue(int nextCommandIndex) diff --git a/Assets/Fungus/UI/Scripts/Commands/Write.cs b/Assets/Fungus/UI/Scripts/Commands/Write.cs index e88d1c63..537d88f7 100644 --- a/Assets/Fungus/UI/Scripts/Commands/Write.cs +++ b/Assets/Fungus/UI/Scripts/Commands/Write.cs @@ -42,6 +42,17 @@ namespace Fungus public ColorData setColor = new ColorData(Color.white); + protected Writer GetWriter() + { + Writer writer = textObject.GetComponent(); + if (writer == null) + { + writer = textObject.AddComponent() as Writer; + } + + return writer; + } + public override void OnEnter() { if (textObject == null) @@ -50,7 +61,7 @@ namespace Fungus return; } - Writer writer = FindWriter(textObject); + Writer writer = GetWriter(); if (writer == null) { Continue(); @@ -101,15 +112,9 @@ namespace Fungus return new Color32(235, 191, 217, 255); } - protected Writer FindWriter(GameObject textObject) + public override void OnStopExecuting() { - Writer writer = textObject.GetComponent(); - if (writer == null) - { - writer = textObject.AddComponent() as Writer; - } - - return writer; + GetWriter().Stop(); } // diff --git a/Assets/Fungus/UI/Scripts/Writer.cs b/Assets/Fungus/UI/Scripts/Writer.cs index d936c2d0..98cb8893 100644 --- a/Assets/Fungus/UI/Scripts/Writer.cs +++ b/Assets/Fungus/UI/Scripts/Writer.cs @@ -269,7 +269,10 @@ namespace Fungus public virtual void Stop() { - exitFlag = true; + if (isWriting || isWaitingForInput) + { + exitFlag = true; + } } public virtual void Write(string content, bool clear, bool waitForInput, AudioClip audioClip, Action onComplete) diff --git a/Assets/Tests/Scripting/Scripting.unity b/Assets/Tests/Scripting/Scripting.unity index d04e4cb5..07283d8a 100644 --- a/Assets/Tests/Scripting/Scripting.unity +++ b/Assets/Tests/Scripting/Scripting.unity @@ -85,6 +85,139 @@ NavMeshSettings: cellSize: .166666672 manualCellSize: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &169310208 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 142980, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 169310209} + - 114: {fileID: 169310215} + - 114: {fileID: 169310214} + - 114: {fileID: 169310213} + - 114: {fileID: 169310211} + - 114: {fileID: 169310210} + m_Layer: 0 + m_Name: Flowchart3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &169310209 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 467082, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 169310208} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 984493284} + m_RootOrder: 3 +--- !u!114 &169310210 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 169310208} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4920f47cde1a84b11ad07b7317568494, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 2 + errorMessage: + indentLevel: 0 +--- !u!114 &169310211 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 169310208} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3315ad2ebb85443909a1203d56d9344e, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 1 + errorMessage: + indentLevel: 0 + duration: 3 +--- !u!114 &169310213 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 11462346, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 169310208} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 169310214} +--- !u!114 &169310214 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 11433304, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 169310208} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 72 + y: 69 + width: 120 + height: 40 + itemId: 0 + blockName: Start + description: + eventHandler: {fileID: 169310213} + commandList: + - {fileID: 169310211} + - {fileID: 169310210} +--- !u!114 &169310215 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11430050, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 169310208} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1.0 + scrollPos: {x: 0, y: 0} + variablesScrollPos: {x: 0, y: 0} + variablesExpanded: 1 + blockViewHeight: 400 + zoom: 1 + scrollViewRect: + serializedVersion: 2 + x: -350 + y: -350 + width: 1126 + height: 869 + selectedBlock: {fileID: 0} + selectedCommands: [] + variables: [] + description: If none of the other Flowcharts have Failed then this one will succeed + stepPause: 0 + colorCommands: 1 + hideComponents: 1 + saveSelection: 1 + localizationId: + hideCommands: [] --- !u!1 &338809961 GameObject: m_ObjectHideFlags: 0 @@ -397,45 +530,490 @@ MonoBehaviour: --- !u!114 &396492939 MonoBehaviour: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 396492925} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70c5622b8a80845c980954170295f292, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 6 + errorMessage: + indentLevel: 0 + compareOperator: 1 + variable: {fileID: 396492927} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: SomeValue +--- !u!114 &396492940 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 396492925} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4920f47cde1a84b11ad07b7317568494, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 9 + errorMessage: + indentLevel: 0 +--- !u!1 &575909998 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 142980, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 575909999} + - 114: {fileID: 575910008} + - 114: {fileID: 575910007} + - 114: {fileID: 575910006} + - 114: {fileID: 575910005} + - 114: {fileID: 575910004} + - 114: {fileID: 575910003} + - 114: {fileID: 575910002} + - 114: {fileID: 575910001} + - 114: {fileID: 575910000} + m_Layer: 0 + m_Name: Flowchart2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &575909999 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 467082, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575909998} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 984493284} + m_RootOrder: 2 +--- !u!114 &575910000 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575909998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2dcb71131f45b47fead560a97ef55f1c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 5 + errorMessage: + indentLevel: 0 + failMessage: +--- !u!114 &575910001 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575909998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ae67a23cb4aa74793b41258ae40bf321, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 4 + errorMessage: + indentLevel: 0 + stopParentFlowchart: 1 + targetFlowcharts: [] +--- !u!114 &575910002 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575909998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3315ad2ebb85443909a1203d56d9344e, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 3 + errorMessage: + indentLevel: 0 + duration: 1 +--- !u!114 &575910003 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575909998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 575910004} +--- !u!114 &575910004 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575909998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 248 + y: 75 + width: 120 + height: 40 + itemId: 2 + blockName: New Block + description: + eventHandler: {fileID: 575910003} + commandList: + - {fileID: 575910002} + - {fileID: 575910001} +--- !u!114 &575910005 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575909998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 1 + errorMessage: + indentLevel: 0 + storyText: Write some text and wait for input + description: + character: {fileID: 0} + portrait: {fileID: 0} + voiceOverClip: {fileID: 0} + showAlways: 1 + showCount: 1 + extendPrevious: 0 + fadeWhenDone: 1 + waitForClick: 1 + setSayDialog: {fileID: 0} +--- !u!114 &575910006 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 11462346, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575909998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 575910007} +--- !u!114 &575910007 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 11433304, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575909998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 72 + y: 69 + width: 120 + height: 40 + itemId: 0 + blockName: Start + description: + eventHandler: {fileID: 575910006} + commandList: + - {fileID: 575910005} + - {fileID: 575910000} +--- !u!114 &575910008 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11430050, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575909998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1.0 + scrollPos: {x: 0, y: 0} + variablesScrollPos: {x: 0, y: 0} + variablesExpanded: 1 + blockViewHeight: 400 + zoom: 1 + scrollViewRect: + serializedVersion: 2 + x: -350 + y: -350 + width: 1126 + height: 869 + selectedBlock: {fileID: 575910007} + selectedCommands: [] + variables: [] + description: Test if interupting a Say command works + stepPause: 0 + colorCommands: 1 + hideComponents: 1 + saveSelection: 1 + localizationId: + hideCommands: [] +--- !u!1 &590474771 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 142980, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 590474772} + - 114: {fileID: 590474781} + - 114: {fileID: 590474780} + - 114: {fileID: 590474779} + - 114: {fileID: 590474778} + - 114: {fileID: 590474777} + - 114: {fileID: 590474776} + - 114: {fileID: 590474775} + - 114: {fileID: 590474774} + - 114: {fileID: 590474773} + - 114: {fileID: 590474782} + m_Layer: 0 + m_Name: Flowchart0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &590474772 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 467082, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 590474771} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 984493284} + m_RootOrder: 0 +--- !u!114 &590474773 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 590474771} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 437f9a4e3dbc647f9bdce95308418bff, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 8 + errorMessage: + indentLevel: 0 + duration: .25 + fadeOut: 0 + targetView: {fileID: 1759271211} + waitUntilFinished: 1 + fadeColor: {r: 0, g: 0, b: 0, a: 1} + fadeTexture: {fileID: 0} +--- !u!114 &590474774 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 590474771} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2dcb71131f45b47fead560a97ef55f1c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 7 + errorMessage: + indentLevel: 0 + failMessage: +--- !u!114 &590474775 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 590474771} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ae67a23cb4aa74793b41258ae40bf321, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 4 + errorMessage: + indentLevel: 0 + stopParentFlowchart: 1 + targetFlowcharts: [] +--- !u!114 &590474776 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 590474771} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3315ad2ebb85443909a1203d56d9344e, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 3 + errorMessage: + indentLevel: 0 + duration: 1 +--- !u!114 &590474777 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 590474771} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 590474778} +--- !u!114 &590474778 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 590474771} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 248 + y: 75 + width: 120 + height: 40 + itemId: 2 + blockName: New Block + description: + eventHandler: {fileID: 590474777} + commandList: + - {fileID: 590474776} + - {fileID: 590474775} +--- !u!114 &590474779 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 11462346, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 590474771} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 590474780} +--- !u!114 &590474780 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 11433304, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 590474771} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 70 + y: 69 + width: 120 + height: 40 + itemId: 0 + blockName: Start + description: + eventHandler: {fileID: 590474779} + commandList: + - {fileID: 590474773} + - {fileID: 590474782} + - {fileID: 590474774} +--- !u!114 &590474781 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11430050, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 396492925} + m_GameObject: {fileID: 590474771} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 70c5622b8a80845c980954170295f292, type: 3} + m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} m_Name: m_EditorClassIdentifier: - itemId: 6 - errorMessage: - indentLevel: 0 - compareOperator: 1 - variable: {fileID: 396492927} - booleanData: - booleanRef: {fileID: 0} - booleanVal: 0 - integerData: - integerRef: {fileID: 0} - integerVal: 0 - floatData: - floatRef: {fileID: 0} - floatVal: 0 - stringData: - stringRef: {fileID: 0} - stringVal: SomeValue ---- !u!114 &396492940 + version: 1.0 + scrollPos: {x: 0, y: 0} + variablesScrollPos: {x: 0, y: 0} + variablesExpanded: 1 + blockViewHeight: 400 + zoom: 1 + scrollViewRect: + serializedVersion: 2 + x: -350 + y: -350 + width: 1126 + height: 869 + selectedBlock: {fileID: 590474780} + selectedCommands: + - {fileID: 590474773} + variables: [] + description: Test if interupting a Write command works + stepPause: 0 + colorCommands: 1 + hideComponents: 1 + saveSelection: 1 + localizationId: + hideCommands: [] +--- !u!114 &590474782 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 396492925} + m_GameObject: {fileID: 590474771} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4920f47cde1a84b11ad07b7317568494, type: 3} + m_Script: {fileID: 11500000, guid: 45c952ea1ad444e479b570fa242679c5, type: 3} m_Name: m_EditorClassIdentifier: itemId: 9 errorMessage: indentLevel: 0 + duration: 5 + targetView: {fileID: 1920662343} + waitUntilFinished: 1 --- !u!1 &636123604 GameObject: m_ObjectHideFlags: 0 @@ -447,14 +1025,15 @@ GameObject: - 114: {fileID: 636123608} - 114: {fileID: 636123607} - 114: {fileID: 636123606} - - 114: {fileID: 636123605} - 114: {fileID: 636123613} - 114: {fileID: 636123612} - 114: {fileID: 636123611} - 114: {fileID: 636123610} + - 114: {fileID: 636123615} + - 114: {fileID: 636123605} - 114: {fileID: 636123614} m_Layer: 0 - m_Name: Flowchart + m_Name: Flowchart1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -468,23 +1047,13 @@ MonoBehaviour: m_GameObject: {fileID: 636123604} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} + m_Script: {fileID: 11500000, guid: 2dcb71131f45b47fead560a97ef55f1c, type: 3} m_Name: m_EditorClassIdentifier: - itemId: 1 + itemId: 7 errorMessage: indentLevel: 0 - storyText: Write some text and wait for input - description: - character: {fileID: 0} - portrait: {fileID: 0} - voiceOverClip: {fileID: 0} - showAlways: 1 - showCount: 1 - extendPrevious: 0 - fadeWhenDone: 1 - waitForClick: 1 - setSayDialog: {fileID: 0} + failMessage: --- !u!114 &636123606 MonoBehaviour: m_ObjectHideFlags: 2 @@ -512,7 +1081,7 @@ MonoBehaviour: m_EditorClassIdentifier: nodeRect: serializedVersion: 2 - x: 69 + x: 70 y: 69 width: 120 height: 40 @@ -521,6 +1090,8 @@ MonoBehaviour: description: eventHandler: {fileID: 636123606} commandList: + - {fileID: 636123614} + - {fileID: 636123615} - {fileID: 636123605} --- !u!114 &636123608 MonoBehaviour: @@ -546,11 +1117,11 @@ MonoBehaviour: y: -350 width: 1126 height: 869 - selectedBlock: {fileID: 636123613} + selectedBlock: {fileID: 636123607} selectedCommands: - {fileID: 636123614} variables: [] - description: + description: Test if interupting a Write command works stepPause: 0 colorCommands: 1 hideComponents: 1 @@ -568,24 +1139,26 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 984493284} - m_RootOrder: 0 + m_RootOrder: 1 --- !u!114 &636123610 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 636123604} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f1ca510a57aa47568a5e4ee558ff41f, type: 3} + m_Script: {fileID: 11500000, guid: ae67a23cb4aa74793b41258ae40bf321, type: 3} m_Name: m_EditorClassIdentifier: itemId: 4 errorMessage: indentLevel: 0 + stopParentFlowchart: 1 + targetFlowcharts: [] --- !u!114 &636123611 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 636123604} @@ -597,10 +1170,10 @@ MonoBehaviour: itemId: 3 errorMessage: indentLevel: 0 - duration: 2 + duration: 1 --- !u!114 &636123612 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 636123604} @@ -612,7 +1185,7 @@ MonoBehaviour: parentBlock: {fileID: 636123613} --- !u!114 &636123613 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 636123604} @@ -633,26 +1206,55 @@ MonoBehaviour: eventHandler: {fileID: 636123612} commandList: - {fileID: 636123611} - - {fileID: 636123614} - {fileID: 636123610} --- !u!114 &636123614 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 636123604} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2fab8abf0343545abbfebd9a7b7b34bd, type: 3} + m_Script: {fileID: 11500000, guid: 437f9a4e3dbc647f9bdce95308418bff, type: 3} m_Name: m_EditorClassIdentifier: - itemId: 5 + itemId: 8 + errorMessage: + indentLevel: 0 + duration: .100000001 + fadeOut: 0 + targetView: {fileID: 0} + waitUntilFinished: 1 + fadeColor: {r: 0, g: 0, b: 0, a: 1} + fadeTexture: {fileID: 0} +--- !u!114 &636123615 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 636123604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ad2261dbe44de43a980e6f7c77c88f7f, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 6 errorMessage: indentLevel: 0 - logType: 0 - logMessage: + textObject: {fileID: 1141004796} + text: stringRef: {fileID: 0} - stringVal: Hi there + stringVal: ' A long block of text that should keep writing' + description: + clearText: 1 + waitUntilFinished: 1 + textColor: 0 + setAlpha: + floatRef: {fileID: 0} + floatVal: 1 + setColor: + colorRef: {fileID: 0} + colorVal: {r: 1, g: 1, b: 1, a: 1} --- !u!1 &646902073 GameObject: m_ObjectHideFlags: 1 @@ -680,7 +1282,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} m_Name: m_EditorClassIdentifier: - selectedFlowchart: {fileID: 636123608} + selectedFlowchart: {fileID: 590474781} --- !u!4 &646902075 Transform: m_ObjectHideFlags: 1 @@ -918,7 +1520,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &984493283 MonoBehaviour: m_ObjectHideFlags: 0 @@ -950,9 +1552,142 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: + - {fileID: 590474772} - {fileID: 636123609} + - {fileID: 575909999} + - {fileID: 169310209} + - {fileID: 1960747668} + - {fileID: 1354065530} + - {fileID: 1759271210} + - {fileID: 1920662342} m_Father: {fileID: 0} m_RootOrder: 5 +--- !u!1 &1141004796 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1141004797} + - 222: {fileID: 1141004799} + - 114: {fileID: 1141004798} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1141004797 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1141004796} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1960747668} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: 4, y: 128} + m_SizeDelta: {x: 609, y: 81} + m_Pivot: {x: .5, y: .5} +--- !u!114 &1141004798 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1141004796} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!222 &1141004799 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1141004796} +--- !u!1 &1354065529 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1354065530} + - 212: {fileID: 1354065531} + m_Layer: 0 + m_Name: Mushroom 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1354065530 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1354065529} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 984493284} + m_RootOrder: 5 +--- !u!212 &1354065531 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1354065529} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 0 + m_ReflectionProbeUsage: 0 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_ImportantGI: 0 + m_AutoUVMaxDistance: .5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: d568b9f360a9641fba3a3c558cfbd607, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} --- !u!1 &1384749029 GameObject: m_ObjectHideFlags: 0 @@ -1783,6 +2518,92 @@ MonoBehaviour: targetObject: {fileID: 1960615183} methodName: TestCallMethod delay: 0 +--- !u!1 &1759271209 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100000, guid: e0d427add844a4d9faf970a3afa07583, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1759271210} + - 114: {fileID: 1759271211} + m_Layer: 0 + m_Name: ViewA + m_TagString: Untagged + m_Icon: {fileID: 5721338939258241955, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1759271210 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400000, guid: e0d427add844a4d9faf970a3afa07583, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1759271209} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 984493284} + m_RootOrder: 6 +--- !u!114 &1759271211 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400000, guid: e0d427add844a4d9faf970a3afa07583, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1759271209} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 95c387d3e32404bcc91c60318d766bb1, type: 3} + m_Name: + m_EditorClassIdentifier: + viewSize: 1.74694014 + primaryAspectRatio: {x: 4, y: 3} + secondaryAspectRatio: {x: 2, y: 1} +--- !u!1 &1920662341 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100000, guid: e0d427add844a4d9faf970a3afa07583, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1920662342} + - 114: {fileID: 1920662343} + m_Layer: 0 + m_Name: ViewB + m_TagString: Untagged + m_Icon: {fileID: 5721338939258241955, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1920662342 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400000, guid: e0d427add844a4d9faf970a3afa07583, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1920662341} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 984493284} + m_RootOrder: 7 +--- !u!114 &1920662343 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400000, guid: e0d427add844a4d9faf970a3afa07583, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1920662341} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 95c387d3e32404bcc91c60318d766bb1, type: 3} + m_Name: + m_EditorClassIdentifier: + viewSize: .795018613 + primaryAspectRatio: {x: 4, y: 3} + secondaryAspectRatio: {x: 2, y: 1} --- !u!1 &1960615183 GameObject: m_ObjectHideFlags: 0 @@ -1824,3 +2645,93 @@ Transform: m_Children: [] m_Father: {fileID: 1384749030} m_RootOrder: 1 +--- !u!1 &1960747667 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1960747668} + - 223: {fileID: 1960747671} + - 114: {fileID: 1960747670} + - 114: {fileID: 1960747669} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1960747668 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1960747667} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1141004797} + m_Father: {fileID: 984493284} + m_RootOrder: 4 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1960747669 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1960747667} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1960747670 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1960747667} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1960747671 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1960747667} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0