Ejemplo n.º 1
0
    public override bool Check(GlobalStorageObject storageObject)
    {
        if (storageObject.floats.ContainsKey(key))
        {
            switch (comparisonType)
            {
            case ComparisonType.Equals:
                return(storageObject.GetFloat(key) == Other.Value);

            case ComparisonType.NotEqual:
                return(storageObject.GetFloat(key) != Other.Value);

            case ComparisonType.GreaterThan:
                return(storageObject.GetFloat(key) > Other.Value);

            case ComparisonType.LessThan:
                return(storageObject.GetFloat(key) < Other.Value);

            case ComparisonType.GreaterOrEqual:
                return(storageObject.GetFloat(key) >= Other.Value);

            case ComparisonType.LessOrEqual:
                return(storageObject.GetFloat(key) <= Other.Value);
            }
        }

        return(false);
    }
Ejemplo n.º 2
0
 public float GetNumber(string variableName)
 {
     return(storage.GetFloat(variableName));
 }