private static SpriterVarValue GetVarValue(string value, SpriterVarType type) { float floatValue = Single.MinValue; int intValue = Int32.MinValue; if (type == SpriterVarType.Float) Single.TryParse(value, out floatValue); else if (type == SpriterVarType.Int) Int32.TryParse(value, out intValue); return new SpriterVarValue { Type = type, StringValue = value, FloatValue = floatValue, IntValue = intValue }; }
protected virtual SpriterVarValue GetVarValue(string value, SpriterVarType type) { float floatValue = float.MinValue; int intValue = int.MinValue; if (type == SpriterVarType.Float) { float.TryParse(value, out floatValue); } else if (type == SpriterVarType.Int) { int.TryParse(value, out intValue); } return(new SpriterVarValue { Type = type, StringValue = value, FloatValue = floatValue, IntValue = intValue }); }
private static SpriterVarValue GetVarValue(string value, SpriterVarType type) { float floatValue = Single.MinValue; int intValue = Int32.MinValue; if (type == SpriterVarType.Float) { Single.TryParse(value, out floatValue); } else if (type == SpriterVarType.Int) { Int32.TryParse(value, out intValue); } return(new SpriterVarValue { Type = type, StringValue = value, FloatValue = floatValue, IntValue = intValue }); }