diff --git a/Assets/Example/Scenes/Example.unity b/Assets/Example/Scenes/Example.unity index b744479d..90adab2c 100644 Binary files a/Assets/Example/Scenes/Example.unity and b/Assets/Example/Scenes/Example.unity differ diff --git a/Assets/Fungus/FungusScript/Commands/EndIf.cs b/Assets/Fungus/FungusScript/Commands/EndIf.cs index 1ce92521..cdb283c2 100644 --- a/Assets/Fungus/FungusScript/Commands/EndIf.cs +++ b/Assets/Fungus/FungusScript/Commands/EndIf.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace Fungus.Script { [CommandInfo("Scripting", - "EndIf", + "End If", "Marks the end of an If statement block.")] public class EndIf : FungusCommand { diff --git a/Assets/Fungus/FungusScript/Commands/Set.cs b/Assets/Fungus/FungusScript/Commands/SetVariable.cs similarity index 96% rename from Assets/Fungus/FungusScript/Commands/Set.cs rename to Assets/Fungus/FungusScript/Commands/SetVariable.cs index 219532a8..3724122f 100644 --- a/Assets/Fungus/FungusScript/Commands/Set.cs +++ b/Assets/Fungus/FungusScript/Commands/SetVariable.cs @@ -4,9 +4,9 @@ using System.Collections; namespace Fungus.Script { [CommandInfo("Scripting", - "Set", + "Set Variable", "Sets a variable to a new value using simple arithmetic operations. The value can be a constant or another variable.")] - public class Set : FungusCommand + public class SetVariable : FungusCommand { public enum SetOperator { @@ -180,7 +180,7 @@ namespace Fungus.Script public override Color GetButtonColor() { - return new Color32(235, 191, 217, 255); + return new Color32(253, 253, 150, 255); } } diff --git a/Assets/Fungus/FungusScript/Commands/Set.cs.meta b/Assets/Fungus/FungusScript/Commands/SetVariable.cs.meta similarity index 100% rename from Assets/Fungus/FungusScript/Commands/Set.cs.meta rename to Assets/Fungus/FungusScript/Commands/SetVariable.cs.meta diff --git a/Assets/Fungus/FungusScript/Editor/SetEditor.cs b/Assets/Fungus/FungusScript/Editor/SetVariableEditor.cs similarity index 78% rename from Assets/Fungus/FungusScript/Editor/SetEditor.cs rename to Assets/Fungus/FungusScript/Editor/SetVariableEditor.cs index 7db41410..268d86c8 100644 --- a/Assets/Fungus/FungusScript/Editor/SetEditor.cs +++ b/Assets/Fungus/FungusScript/Editor/SetVariableEditor.cs @@ -6,14 +6,14 @@ using System.Collections.Generic; namespace Fungus.Script { - [CustomEditor (typeof(Set))] - public class SetEditor : FungusCommandEditor + [CustomEditor (typeof(SetVariable))] + public class SetVariableEditor : FungusCommandEditor { public override void DrawCommandGUI() { serializedObject.Update(); - Set t = target as Set; + SetVariable t = target as SetVariable; FungusScript fungusScript = t.GetFungusScript(); if (fungusScript == null) @@ -55,29 +55,29 @@ namespace Fungus.Script switch (t.setOperator) { default: - case Set.SetOperator.Assign: + case SetVariable.SetOperator.Assign: selectedIndex = 0; break; - case Set.SetOperator.Negate: + case SetVariable.SetOperator.Negate: selectedIndex = 1; break; - case Set.SetOperator.Add: + case SetVariable.SetOperator.Add: selectedIndex = 1; break; - case Set.SetOperator.Subtract: + case SetVariable.SetOperator.Subtract: selectedIndex = 2; break; - case Set.SetOperator.Multiply: + case SetVariable.SetOperator.Multiply: selectedIndex = 3; break; - case Set.SetOperator.Divide: + case SetVariable.SetOperator.Divide: selectedIndex = 4; break; } selectedIndex = EditorGUILayout.Popup(new GUIContent("Operator", "Arithmetic operator to use"), selectedIndex, operatorsList.ToArray()); - Set.SetOperator setOperator = Set.SetOperator.Assign; + SetVariable.SetOperator setOperator = SetVariable.SetOperator.Assign; if (variable.GetType() == typeof(BooleanVariable) || variable.GetType() == typeof(StringVariable)) { @@ -85,10 +85,10 @@ namespace Fungus.Script { default: case 0: - setOperator = Set.SetOperator.Assign; + setOperator = SetVariable.SetOperator.Assign; break; case 1: - setOperator = Set.SetOperator.Negate; + setOperator = SetVariable.SetOperator.Negate; break; } } @@ -99,19 +99,19 @@ namespace Fungus.Script { default: case 0: - setOperator = Set.SetOperator.Assign; + setOperator = SetVariable.SetOperator.Assign; break; case 1: - setOperator = Set.SetOperator.Add; + setOperator = SetVariable.SetOperator.Add; break; case 2: - setOperator = Set.SetOperator.Subtract; + setOperator = SetVariable.SetOperator.Subtract; break; case 3: - setOperator = Set.SetOperator.Multiply; + setOperator = SetVariable.SetOperator.Multiply; break; case 4: - setOperator = Set.SetOperator.Divide; + setOperator = SetVariable.SetOperator.Divide; break; } } diff --git a/Assets/Fungus/FungusScript/Editor/SetEditor.cs.meta b/Assets/Fungus/FungusScript/Editor/SetVariableEditor.cs.meta similarity index 100% rename from Assets/Fungus/FungusScript/Editor/SetEditor.cs.meta rename to Assets/Fungus/FungusScript/Editor/SetVariableEditor.cs.meta