From 45c5652f4d432ebf5670313dd67551143412794e Mon Sep 17 00:00:00 2001 From: Jorge Ramirez Date: Sun, 1 Apr 2018 13:41:09 -0400 Subject: [PATCH] Improve naming convention for variable specific operators --- Assets/Fungus/Scripts/Commands/SetVariable.cs | 10 +++++----- Assets/Fungus/Scripts/VariableTypes/BooleanVariable.cs | 2 +- Assets/Fungus/Scripts/VariableTypes/FloatVariable.cs | 2 +- .../Fungus/Scripts/VariableTypes/GameObjectVariable.cs | 2 +- Assets/Fungus/Scripts/VariableTypes/IntegerVariable.cs | 2 +- Assets/Fungus/Scripts/VariableTypes/StringVariable.cs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Assets/Fungus/Scripts/Commands/SetVariable.cs b/Assets/Fungus/Scripts/Commands/SetVariable.cs index 32cd5291..4b3d9b8b 100644 --- a/Assets/Fungus/Scripts/Commands/SetVariable.cs +++ b/Assets/Fungus/Scripts/Commands/SetVariable.cs @@ -79,11 +79,11 @@ namespace Fungus #region Public members public static readonly Dictionary operatorsByVariableType = new Dictionary() { - { typeof(BooleanVariable), BooleanVariable.operators }, - { typeof(IntegerVariable), IntegerVariable.operators }, - { typeof(FloatVariable), FloatVariable.operators }, - { typeof(StringVariable), StringVariable.operators }, - { typeof(GameObjectVariable), GameObjectVariable.operators } + { typeof(BooleanVariable), BooleanVariable.setOperators }, + { typeof(IntegerVariable), IntegerVariable.setOperators }, + { typeof(FloatVariable), FloatVariable.setOperators }, + { typeof(StringVariable), StringVariable.setOperators }, + { typeof(GameObjectVariable), GameObjectVariable.setOperators } }; /// diff --git a/Assets/Fungus/Scripts/VariableTypes/BooleanVariable.cs b/Assets/Fungus/Scripts/VariableTypes/BooleanVariable.cs index 176634e1..1037241a 100644 --- a/Assets/Fungus/Scripts/VariableTypes/BooleanVariable.cs +++ b/Assets/Fungus/Scripts/VariableTypes/BooleanVariable.cs @@ -13,7 +13,7 @@ namespace Fungus [System.Serializable] public class BooleanVariable : VariableBase { - public static readonly SetOperator[] operators = { SetOperator.Assign, SetOperator.Negate }; + public static readonly SetOperator[] setOperators = { SetOperator.Assign, SetOperator.Negate }; public virtual bool Evaluate(CompareOperator compareOperator, bool booleanValue) { diff --git a/Assets/Fungus/Scripts/VariableTypes/FloatVariable.cs b/Assets/Fungus/Scripts/VariableTypes/FloatVariable.cs index 20658636..d3e9614f 100644 --- a/Assets/Fungus/Scripts/VariableTypes/FloatVariable.cs +++ b/Assets/Fungus/Scripts/VariableTypes/FloatVariable.cs @@ -13,7 +13,7 @@ namespace Fungus [System.Serializable] public class FloatVariable : VariableBase { - public static readonly SetOperator[] operators = { SetOperator.Assign, SetOperator.Add, SetOperator.Subtract, SetOperator.Multiply, SetOperator.Divide }; + public static readonly SetOperator[] setOperators = { SetOperator.Assign, SetOperator.Add, SetOperator.Subtract, SetOperator.Multiply, SetOperator.Divide }; public virtual bool Evaluate(CompareOperator compareOperator, float floatValue) { diff --git a/Assets/Fungus/Scripts/VariableTypes/GameObjectVariable.cs b/Assets/Fungus/Scripts/VariableTypes/GameObjectVariable.cs index f67a9db8..4cf7b1ba 100644 --- a/Assets/Fungus/Scripts/VariableTypes/GameObjectVariable.cs +++ b/Assets/Fungus/Scripts/VariableTypes/GameObjectVariable.cs @@ -14,7 +14,7 @@ namespace Fungus [System.Serializable] public class GameObjectVariable : VariableBase { - public static readonly SetOperator[] operators = { SetOperator.Assign }; + public static readonly SetOperator[] setOperators = { SetOperator.Assign }; public override void Apply(SetOperator setOperator, GameObject value) { diff --git a/Assets/Fungus/Scripts/VariableTypes/IntegerVariable.cs b/Assets/Fungus/Scripts/VariableTypes/IntegerVariable.cs index 19692205..a3a78b78 100644 --- a/Assets/Fungus/Scripts/VariableTypes/IntegerVariable.cs +++ b/Assets/Fungus/Scripts/VariableTypes/IntegerVariable.cs @@ -13,7 +13,7 @@ namespace Fungus [System.Serializable] public class IntegerVariable : VariableBase { - public static readonly SetOperator[] operators = { SetOperator.Assign, SetOperator.Add, SetOperator.Subtract, SetOperator.Multiply, SetOperator.Divide }; + public static readonly SetOperator[] setOperators = { SetOperator.Assign, SetOperator.Add, SetOperator.Subtract, SetOperator.Multiply, SetOperator.Divide }; public virtual bool Evaluate(CompareOperator compareOperator, int integerValue) { diff --git a/Assets/Fungus/Scripts/VariableTypes/StringVariable.cs b/Assets/Fungus/Scripts/VariableTypes/StringVariable.cs index f590f2c9..c9772b3b 100644 --- a/Assets/Fungus/Scripts/VariableTypes/StringVariable.cs +++ b/Assets/Fungus/Scripts/VariableTypes/StringVariable.cs @@ -13,7 +13,7 @@ namespace Fungus [System.Serializable] public class StringVariable : VariableBase { - public static readonly SetOperator[] operators = { SetOperator.Assign }; + public static readonly SetOperator[] setOperators = { SetOperator.Assign }; public virtual bool Evaluate(CompareOperator compareOperator, string stringValue) {