Browse Source

Renamed AddOption to Option

master
chrisgregan 11 years ago
parent
commit
dca40df6a8
  1. 12
      Assets/Fungus/Editor/FungusScript/OptionEditor.cs
  2. 0
      Assets/Fungus/Editor/FungusScript/OptionEditor.cs.meta
  3. 2
      Assets/Fungus/VisualScripting/Option.cs
  4. 0
      Assets/Fungus/VisualScripting/Option.cs.meta
  5. BIN
      Assets/Shuttle/ShuttleGame.unity

12
Assets/Fungus/Editor/FungusScript/AddOptionEditor.cs → Assets/Fungus/Editor/FungusScript/OptionEditor.cs

@ -7,23 +7,23 @@ using System.Collections.Generic;
namespace Fungus.Script namespace Fungus.Script
{ {
[CustomEditor (typeof(AddOption))] [CustomEditor (typeof(Option))]
public class AddOptionEditor : FungusCommandEditor public class OptionEditor : FungusCommandEditor
{ {
public override void DrawCommandGUI() public override void DrawCommandGUI()
{ {
AddOption t = target as AddOption; Option t = target as Option;
EditorGUI.BeginChangeCheck(); EditorGUI.BeginChangeCheck();
string optionText = EditorGUILayout.TextField(new GUIContent("Option Text", "Text for option button label"), t.optionText); string optionText = EditorGUILayout.TextField(new GUIContent("Option Text", "Text for option button label"), t.optionText);
Sequence targetSequence = SequenceEditor.SequenceField(new GUIContent("Target Sequence", "Sequence to execute when option is selected"), t.GetFungusScript(), t.targetSequence); Sequence targetSequence = SequenceEditor.SequenceField(new GUIContent("Target Sequence", "Sequence to execute when option is selected"), t.GetFungusScript(), t.targetSequence);
AddOption.ShowCondition showCondition = (AddOption.ShowCondition)EditorGUILayout.EnumPopup(new GUIContent("Show Condition", "Condition when this option should be visible."), t.showCondition); Option.ShowCondition showCondition = (Option.ShowCondition)EditorGUILayout.EnumPopup(new GUIContent("Show Condition", "Condition when this option should be visible."), t.showCondition);
BooleanVariable booleanVariable = t.booleanVariable; BooleanVariable booleanVariable = t.booleanVariable;
if (showCondition == AddOption.ShowCondition.BooleanIsFalse || if (showCondition == Option.ShowCondition.BooleanIsFalse ||
showCondition == AddOption.ShowCondition.BooleanIsTrue) showCondition == Option.ShowCondition.BooleanIsTrue)
{ {
booleanVariable = FungusVariableEditor.VariableField (new GUIContent ("Boolean Variable", "Boolean variable to test for condition"), booleanVariable = FungusVariableEditor.VariableField (new GUIContent ("Boolean Variable", "Boolean variable to test for condition"),
t.GetFungusScript (), t.GetFungusScript (),

0
Assets/Fungus/Editor/FungusScript/AddOptionEditor.cs.meta → Assets/Fungus/Editor/FungusScript/OptionEditor.cs.meta

2
Assets/Fungus/VisualScripting/AddOption.cs → Assets/Fungus/VisualScripting/Option.cs

@ -5,7 +5,7 @@ using System.Collections.Generic;
namespace Fungus.Script namespace Fungus.Script
{ {
public class AddOption : FungusCommand public class Option : FungusCommand
{ {
public enum ShowCondition public enum ShowCondition
{ {

0
Assets/Fungus/VisualScripting/AddOption.cs.meta → Assets/Fungus/VisualScripting/Option.cs.meta

BIN
Assets/Shuttle/ShuttleGame.unity

Binary file not shown.
Loading…
Cancel
Save