protected override bool EvaluateCondition() { if (variable == null) { return(false); } bool condition = false; if (variable.GetType() == typeof(BooleanVariable)) { BooleanVariable booleanVariable = (variable as BooleanVariable); condition = booleanVariable.Evaluate(compareOperator, booleanData.Value); } else if (variable.GetType() == typeof(IntegerVariable)) { IntegerVariable integerVariable = (variable as IntegerVariable); condition = integerVariable.Evaluate(compareOperator, integerData.Value); } else if (variable.GetType() == typeof(FloatVariable)) { FloatVariable floatVariable = (variable as FloatVariable); condition = floatVariable.Evaluate(compareOperator, floatData.Value); } else if (variable.GetType() == typeof(StringVariable)) { StringVariable stringVariable = (variable as StringVariable); condition = stringVariable.Evaluate(compareOperator, stringData.Value); } else if (variable.GetType() == typeof(GameObjectVariable)) { GameObjectVariable gameObjectVariable = (variable as GameObjectVariable); condition = gameObjectVariable.Evaluate(compareOperator, gameObjectData.Value); } return(condition); }
public FloatData(float v) { floatVal = v; floatRef = null; }