public override object ConvertTo(CLS_Content content, object src, CLType targetType)
 {
     return((GameObject)src);
 }
示例#2
0
    public override object Math2Value(CLS_Content content, char code, object left, CLS_Content.Value right, out CLType returntype)
    {
        if (code == '*')
        {
            if (right.value is Quaternion)
            {
                returntype = typeof(Quaternion);
                return(((Quaternion)left) * ((Quaternion)right.value));
            }
            if (right.value is Vector3)
            {
                returntype = typeof(Vector3);
                return(((Quaternion)left) * ((Vector3)right.value));
            }
        }

        return(base.Math2Value(content, code, left, right, out returntype));
    }
 public override object ConvertTo(CLS_Content content, object src, CLType targetType)
 {
     return((BoxCollider)src);
 }
示例#4
0
 public override object ConvertTo(CLS_Content content, object src, CLType targetType)
 {
     return((Quaternion)src);
 }
示例#5
0
 public override object ConvertTo(CLS_Content content, object src, CLType targetType)
 {
     return((MonoBehaviour)src);
 }
示例#6
0
 public override object ConvertTo(CLS_Content content, object src, CLType targetType)
 {
     return((UnityEngine.Random)src);
 }
示例#7
0
    public override object Math2Value(CLS_Content content, char code, object left, CLS_Content.Value right, out CLType returntype)
    {
        if (code == '+')
        {
            if (right.value is Color)
            {
                returntype = typeof(Color);
                return(((Color)left) + ((Color)right.value));
            }
        }
        if (code == '-')
        {
            returntype = typeof(Color);
            return(((Color)left) - ((Color)right.value));
        }
        if (code == '*')
        {
            if (right.value is Color)
            {
                returntype = typeof(Color);
                return(((Color)left) * ((Color)right.value));
            }
            if (right.value is float)
            {
                returntype = typeof(Color);
                return(((Color)left) * Convert.ToSingle(right.value));
            }
        }
        if (code == '/')
        {
            returntype = typeof(Color);
            return(((Color)left) / Convert.ToSingle(right.value));
        }

        return(base.Math2Value(content, code, left, right, out returntype));
    }
示例#8
0
 public override object ConvertTo(CLS_Content content, object src, CLType targetType)
 {
     return((Transform)src);
 }