2 changed files with 0 additions and 85 deletions
@ -1,73 +0,0 @@ |
|||||||
using UnityEngine; |
|
||||||
using UnityEngine.Serialization; |
|
||||||
using System.Collections; |
|
||||||
using System.Collections.Generic; |
|
||||||
|
|
||||||
namespace Fungus |
|
||||||
{ |
|
||||||
/** |
|
||||||
* Legacy support for Run Script command |
|
||||||
*/ |
|
||||||
[CommandInfo("Scripting", |
|
||||||
"Run Script", |
|
||||||
"Obsolete: use Run Flowchart instead")] |
|
||||||
public class RunScript : RunFlowchart |
|
||||||
{} |
|
||||||
|
|
||||||
[CommandInfo("Scripting", |
|
||||||
"Run Flowchart", |
|
||||||
"Start executing another Flowchart.")] |
|
||||||
[AddComponentMenu("")] |
|
||||||
public class RunFlowchart : Command |
|
||||||
{ |
|
||||||
[FormerlySerializedAs("targetScript")] |
|
||||||
[Tooltip("Reference to another Flowchart to execute")] |
|
||||||
public Flowchart targetFlowchart; |
|
||||||
|
|
||||||
[FormerlySerializedAs("targetSequence")] |
|
||||||
[Tooltip("Name of block to execute in target Flowchart")] |
|
||||||
public string targetBlockName; |
|
||||||
|
|
||||||
[FormerlySerializedAs("stopCurrentSequence")] |
|
||||||
[Tooltip("Stop executing the current block before executing the new Flowchart")] |
|
||||||
public bool stopCurrentBlock = true; |
|
||||||
|
|
||||||
public override void OnEnter() |
|
||||||
{ |
|
||||||
if (targetFlowchart != null) |
|
||||||
{ |
|
||||||
if (stopCurrentBlock) |
|
||||||
{ |
|
||||||
Stop(); |
|
||||||
} |
|
||||||
|
|
||||||
targetFlowchart.ExecuteBlock(targetBlockName); |
|
||||||
|
|
||||||
if (!stopCurrentBlock) |
|
||||||
{ |
|
||||||
Continue(); |
|
||||||
} |
|
||||||
} |
|
||||||
else |
|
||||||
{ |
|
||||||
Continue(); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public override string GetSummary() |
|
||||||
{ |
|
||||||
if (targetFlowchart == null) |
|
||||||
{ |
|
||||||
return "<Continue>"; |
|
||||||
} |
|
||||||
|
|
||||||
return targetFlowchart.name; |
|
||||||
} |
|
||||||
|
|
||||||
public override Color GetButtonColor() |
|
||||||
{ |
|
||||||
return new Color32(235, 191, 217, 255); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,12 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 9ed78eb6565e44839b4be415cd2866dd |
|
||||||
timeCreated: 1427712579 |
|
||||||
licenseType: Free |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
||||||
assetBundleName: |
|
||||||
assetBundleVariant: |
|
Loading…
Reference in new issue