Browse Source

Use Value accessor for Call start label

master
Christopher 8 years ago
parent
commit
0edc47ac6f
  1. 6
      Assets/Fungus/Scripts/Commands/Call.cs

6
Assets/Fungus/Scripts/Commands/Call.cs

@ -37,7 +37,7 @@ namespace Fungus
[Tooltip("Block to start executing")] [Tooltip("Block to start executing")]
[SerializeField] protected Block targetBlock; [SerializeField] protected Block targetBlock;
[Tooltip("Label to start exeuction at. Takes priority over startIndex.")] [Tooltip("Label to start execution at. Takes priority over startIndex.")]
[SerializeField] protected StringData startLabel = new StringData(); [SerializeField] protected StringData startLabel = new StringData();
[Tooltip("Command index to start executing")] [Tooltip("Command index to start executing")]
@ -75,9 +75,9 @@ namespace Fungus
// Find the command index to start execution at // Find the command index to start execution at
int index = startIndex; int index = startIndex;
if (startLabel != "") if (startLabel.Value != "")
{ {
int labelIndex = targetBlock.GetLabelIndex(startLabel); int labelIndex = targetBlock.GetLabelIndex(startLabel.Value);
if (labelIndex != -1) if (labelIndex != -1)
{ {
index = labelIndex; index = labelIndex;

Loading…
Cancel
Save