Browse Source

Fixed aliased commandIndex property in Call.

master
Christopher 9 years ago
parent
commit
875b5f190f
  1. 6
      Assets/Fungus/Flowchart/Editor/CallEditor.cs
  2. 7
      Assets/Fungus/Flowchart/Scripts/Commands/Call.cs

6
Assets/Fungus/Flowchart/Editor/CallEditor.cs

@ -10,7 +10,7 @@ namespace Fungus
{ {
protected SerializedProperty targetFlowchartProp; protected SerializedProperty targetFlowchartProp;
protected SerializedProperty targetBlockProp; protected SerializedProperty targetBlockProp;
protected SerializedProperty commandIndexProp; protected SerializedProperty startIndexProp;
protected SerializedProperty callModeProp; protected SerializedProperty callModeProp;
protected virtual void OnEnable() protected virtual void OnEnable()
@ -20,7 +20,7 @@ namespace Fungus
targetFlowchartProp = serializedObject.FindProperty("targetFlowchart"); targetFlowchartProp = serializedObject.FindProperty("targetFlowchart");
targetBlockProp = serializedObject.FindProperty("targetBlock"); targetBlockProp = serializedObject.FindProperty("targetBlock");
commandIndexProp = serializedObject.FindProperty("commandIndex"); startIndexProp = serializedObject.FindProperty("startIndex");
callModeProp = serializedObject.FindProperty("callMode"); callModeProp = serializedObject.FindProperty("callMode");
} }
@ -49,7 +49,7 @@ namespace Fungus
new GUIContent("<None>"), new GUIContent("<None>"),
flowchart); flowchart);
EditorGUILayout.PropertyField(commandIndexProp); EditorGUILayout.PropertyField(startIndexProp);
} }
EditorGUILayout.PropertyField(callModeProp); EditorGUILayout.PropertyField(callModeProp);

7
Assets/Fungus/Flowchart/Scripts/Commands/Call.cs

@ -21,7 +21,8 @@ namespace Fungus
public Block targetBlock; public Block targetBlock;
[Tooltip("Command index to start executing")] [Tooltip("Command index to start executing")]
public int commandIndex; [FormerlySerializedAs("commandIndex")]
public int startIndex;
public enum CallMode public enum CallMode
{ {
@ -67,12 +68,12 @@ namespace Fungus
flowchart.selectedBlock = targetBlock; flowchart.selectedBlock = targetBlock;
} }
StartCoroutine(targetBlock.Execute(commandIndex, onComplete)); StartCoroutine(targetBlock.Execute(startIndex, onComplete));
} }
else else
{ {
// Execute block in another Flowchart // Execute block in another Flowchart
targetFlowchart.ExecuteBlock(targetBlock, commandIndex, onComplete); targetFlowchart.ExecuteBlock(targetBlock, startIndex, onComplete);
} }
} }

Loading…
Cancel
Save