public override string ToString()
        {
            switch (Type)
            {
            case ValueType.Unknown:
                return(ValueType.Unknown.ToString());

            case ValueType.Bool:
                return(Bool.ToString());

            case ValueType.Int:
                return(Int.ToString());

            case ValueType.Float:
                return(Float.ToString());

            case ValueType.Float2:
                return(Float2.ToString());

            case ValueType.Float3:
                return(Float3.ToString());

            case ValueType.Float4:
                return(Float4.ToString());

            case ValueType.Quaternion:
                return(Quaternion.ToString());

            case ValueType.Entity:
                return(Entity.ToString());

            case ValueType.StringReference:
                return(_string.ToString());

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Exemplo n.º 2
0
        public string ToPrettyString()
        {
            switch (Type)
            {
            case ValueType.Unknown:
                return(ValueType.Unknown.ToString());

            case ValueType.Bool:
                return(Bool.ToString(CultureInfo.InvariantCulture));

            case ValueType.Int:
                return(Int.ToString(CultureInfo.InvariantCulture));

            case ValueType.Float:
                return(Float.ToString("F2"));

            case ValueType.Float2:
                return(Float2.ToString("F2", CultureInfo.InvariantCulture));

            case ValueType.Float3:
                return(Float3.ToString("F2", CultureInfo.InvariantCulture));

            case ValueType.Float4:
                return(Float4.ToString("F2", CultureInfo.InvariantCulture));

            case ValueType.Quaternion:
                return(Quaternion.ToString("F2", CultureInfo.InvariantCulture));

            case ValueType.Entity:
                return(Entity.ToString());

            case ValueType.StringReference:
                return(_string.ToString());

            default:
                throw new ArgumentOutOfRangeException();
            }
        }