コード例 #1
0
        static object PerformMemberwiseClone(ref object o)
        {
            var ins = new UnityEngine.Space();

            ins = (UnityEngine.Space)o;
            return(ins);
        }
コード例 #2
0
        static StackObject *Rotate_4(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 4);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Space @relativeTo = (UnityEngine.Space) typeof(UnityEngine.Space).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Single @angle = *(float *)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.Vector3 @axis = (UnityEngine.Vector3) typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform) typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Rotate(@axis, @angle, @relativeTo);

            return(__ret);
        }
コード例 #3
0
        static StackObject *Translate_4(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Space @relativeTo = (UnityEngine.Space) typeof(UnityEngine.Space).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Vector3 @translation = new UnityEngine.Vector3();
            if (ILRuntime.Runtime.Generated.CLRBindings.s_UnityEngine_Vector3_Binding_Binder != null)
            {
                ILRuntime.Runtime.Generated.CLRBindings.s_UnityEngine_Vector3_Binding_Binder.ParseValue(ref @translation, __intp, ptr_of_this_method, __mStack, true);
            }
            else
            {
                @translation = (UnityEngine.Vector3) typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
                __intp.Free(ptr_of_this_method);
            }

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform) typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Translate(@translation, @relativeTo);

            return(__ret);
        }
コード例 #4
0
 public override void move(UnityEngine.Vector3 moveDelta, UnityEngine.Space space)
 {
     if (mmove_43.CheckShouldInvokeBase(this.instance))
     {
         base.move(moveDelta, space);
     }
     else
     {
         mmove_43.Invoke(this.instance, moveDelta, space);
     }
 }
コード例 #5
0
 public void Translate(System.Single x, System.Single y, System.Single z, UnityEngine.Space relativeTo)
 {
     //Mock Data:
     if (m_functionCallCounts == null)
     {
         m_functionCallCounts = new Dictionary <string, int>();
     }
     if (!m_functionCallCounts.ContainsKey("Void Translate(Single, Single, Single, Space)"))
     {
         m_functionCallCounts.Add("Void Translate(Single, Single, Single, Space)", 0);
     }
     m_functionCallCounts["Void Translate(Single, Single, Single, Space)"]++;
 }
コード例 #6
0
 public void Translate(UnityEngine.Vector3 translation, UnityEngine.Space relativeTo)
 {
     //Mock Data:
     if (m_functionCallCounts == null)
     {
         m_functionCallCounts = new Dictionary <string, int>();
     }
     if (!m_functionCallCounts.ContainsKey("Void Translate(Vector3, Space)"))
     {
         m_functionCallCounts.Add("Void Translate(Vector3, Space)", 0);
     }
     m_functionCallCounts["Void Translate(Vector3, Space)"]++;
 }
コード例 #7
0
        static void WriteBackInstance(CSHotFix.Runtime.Enviorment.AppDomain __domain, StackObject *ptr_of_this_method, IList <object> __mStack, ref UnityEngine.Space instance_of_this_method)
        {
            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
            switch (ptr_of_this_method->ObjectType)
            {
            case ObjectTypes.Object:
            {
                __mStack[ptr_of_this_method->Value] = instance_of_this_method;
            }
            break;

            case ObjectTypes.FieldReference:
            {
                var ___obj = __mStack[ptr_of_this_method->Value];
                if (___obj is ILTypeInstance)
                {
                    ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method;
                }
                else
                {
                    var t = __domain.GetType(___obj.GetType()) as CLRType;
                    t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method);
                }
            }
            break;

            case ObjectTypes.StaticFieldReference:
            {
                var t = __domain.GetType(ptr_of_this_method->Value);
                if (t is ILType)
                {
                    ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method;
                }
                else
                {
                    ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method);
                }
            }
            break;

            case ObjectTypes.ArrayReference:
            {
                var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as UnityEngine.Space[];
                instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method;
            }
            break;
            }
        }
コード例 #8
0
        static StackObject *Translate_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Space @relativeTo = (UnityEngine.Space) typeof(UnityEngine.Space).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Vector3 @translation = (UnityEngine.Vector3) typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.Transform instance_of_this_method = (UnityEngine.Transform) typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Translate(@translation, @relativeTo);

            return(__ret);
        }
コード例 #9
0
ファイル: TransformWrap.cs プロジェクト: JBLRADISH/UnityLua
    public static int Translate(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 3 && LuaAPI.IsObject(L, 1) && LuaAPI.IsVector3(L, 2) && LuaAPI.IsNumber(L, 3))
        {
            UnityEngine.Transform arg0 = (UnityEngine.Transform)LuaCallback.ToObject(L, 1);
            UnityEngine.Vector3   arg1 = (UnityEngine.Vector3)LuaCallback.ToVector3(L, 2);
            UnityEngine.Space     arg2 = (UnityEngine.Space)LuaCallback.ToNumber(L, 3);
            arg0.Translate(arg1, arg2);

            return(0);
        }
        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsVector3(L, 2))
        {
            UnityEngine.Transform arg0 = (UnityEngine.Transform)LuaCallback.ToObject(L, 1);
            UnityEngine.Vector3   arg1 = (UnityEngine.Vector3)LuaCallback.ToVector3(L, 2);
            arg0.Translate(arg1);

            return(0);
        }
        if (nargs == 5 && LuaAPI.IsObject(L, 1) && LuaAPI.IsNumber(L, 2) && LuaAPI.IsNumber(L, 3) && LuaAPI.IsNumber(L, 4) && LuaAPI.IsNumber(L, 5))
        {
            UnityEngine.Transform arg0 = (UnityEngine.Transform)LuaCallback.ToObject(L, 1);
            System.Single         arg1 = (System.Single)LuaCallback.ToNumber(L, 2);
            System.Single         arg2 = (System.Single)LuaCallback.ToNumber(L, 3);
            System.Single         arg3 = (System.Single)LuaCallback.ToNumber(L, 4);
            UnityEngine.Space     arg4 = (UnityEngine.Space)LuaCallback.ToNumber(L, 5);
            arg0.Translate(arg1, arg2, arg3, arg4);

            return(0);
        }
        if (nargs == 4 && LuaAPI.IsObject(L, 1) && LuaAPI.IsNumber(L, 2) && LuaAPI.IsNumber(L, 3) && LuaAPI.IsNumber(L, 4))
        {
            UnityEngine.Transform arg0 = (UnityEngine.Transform)LuaCallback.ToObject(L, 1);
            System.Single         arg1 = (System.Single)LuaCallback.ToNumber(L, 2);
            System.Single         arg2 = (System.Single)LuaCallback.ToNumber(L, 3);
            System.Single         arg3 = (System.Single)LuaCallback.ToNumber(L, 4);
            arg0.Translate(arg1, arg2, arg3);

            return(0);
        }
        if (nargs == 3 && LuaAPI.IsObject(L, 1) && LuaAPI.IsVector3(L, 2) && LuaAPI.IsObject(L, 3))
        {
            UnityEngine.Transform arg0 = (UnityEngine.Transform)LuaCallback.ToObject(L, 1);
            UnityEngine.Vector3   arg1 = (UnityEngine.Vector3)LuaCallback.ToVector3(L, 2);
            UnityEngine.Transform arg2 = (UnityEngine.Transform)LuaCallback.ToObject(L, 3);
            arg0.Translate(arg1, arg2);

            return(0);
        }
        if (nargs == 5 && LuaAPI.IsObject(L, 1) && LuaAPI.IsNumber(L, 2) && LuaAPI.IsNumber(L, 3) && LuaAPI.IsNumber(L, 4) && LuaAPI.IsObject(L, 5))
        {
            UnityEngine.Transform arg0 = (UnityEngine.Transform)LuaCallback.ToObject(L, 1);
            System.Single         arg1 = (System.Single)LuaCallback.ToNumber(L, 2);
            System.Single         arg2 = (System.Single)LuaCallback.ToNumber(L, 3);
            System.Single         arg3 = (System.Single)LuaCallback.ToNumber(L, 4);
            UnityEngine.Transform arg4 = (UnityEngine.Transform)LuaCallback.ToObject(L, 5);
            arg0.Translate(arg1, arg2, arg3, arg4);

            return(0);
        }
        return(0);
    }
コード例 #10
0
ファイル: LuaTransform.cs プロジェクト: sakyaer/emoji
        public static int Rotate(IntPtr L)
        {
            int result = 1;
            int count  = LuaDLL.lua_gettop(L);

            if (count == 2 &&
                LuaStatic.CheckType(L, typeof(UnityEngine.Vector3), 2))
            {
                UnityEngine.Transform obj  = LuaStatic.GetObj(L, 1) as UnityEngine.Transform;
                UnityEngine.Vector3   arg1 = (UnityEngine.Vector3)LuaStatic.GetObj(L, 2);
                obj.Rotate(arg1);

                return(result);
            }
            if (count == 3 &&
                LuaStatic.CheckType(L, typeof(UnityEngine.Vector3), 2) &&
                LuaStatic.CheckType(L, typeof(UnityEngine.Space), 3))
            {
                UnityEngine.Transform obj  = LuaStatic.GetObj(L, 1) as UnityEngine.Transform;
                UnityEngine.Vector3   arg1 = (UnityEngine.Vector3)LuaStatic.GetObj(L, 2);
                UnityEngine.Space     arg2 = (UnityEngine.Space)(double)(LuaStatic.GetObj(L, 3));
                obj.Rotate(arg1, arg2);

                return(result);
            }
            if (count == 4 &&
                LuaStatic.CheckType(L, typeof(Single), 2) &&
                LuaStatic.CheckType(L, typeof(Single), 3) &&
                LuaStatic.CheckType(L, typeof(Single), 4))
            {
                UnityEngine.Transform obj = LuaStatic.GetObj(L, 1) as UnityEngine.Transform;
                Single arg1 = (Single)(double)(LuaStatic.GetObj(L, 2));
                Single arg2 = (Single)(double)(LuaStatic.GetObj(L, 3));
                Single arg3 = (Single)(double)(LuaStatic.GetObj(L, 4));
                obj.Rotate(arg1, arg2, arg3);

                return(result);
            }
            if (count == 5 &&
                LuaStatic.CheckType(L, typeof(Single), 2) &&
                LuaStatic.CheckType(L, typeof(Single), 3) &&
                LuaStatic.CheckType(L, typeof(Single), 4) &&
                LuaStatic.CheckType(L, typeof(UnityEngine.Space), 5))
            {
                UnityEngine.Transform obj = LuaStatic.GetObj(L, 1) as UnityEngine.Transform;
                Single            arg1    = (Single)(double)(LuaStatic.GetObj(L, 2));
                Single            arg2    = (Single)(double)(LuaStatic.GetObj(L, 3));
                Single            arg3    = (Single)(double)(LuaStatic.GetObj(L, 4));
                UnityEngine.Space arg4    = (UnityEngine.Space)(double)(LuaStatic.GetObj(L, 5));
                obj.Rotate(arg1, arg2, arg3, arg4);

                return(result);
            }
            if (count == 3 &&
                LuaStatic.CheckType(L, typeof(UnityEngine.Vector3), 2) &&
                LuaStatic.CheckType(L, typeof(Single), 3))
            {
                UnityEngine.Transform obj  = LuaStatic.GetObj(L, 1) as UnityEngine.Transform;
                UnityEngine.Vector3   arg1 = (UnityEngine.Vector3)LuaStatic.GetObj(L, 2);
                Single arg2 = (Single)(double)(LuaStatic.GetObj(L, 3));
                obj.Rotate(arg1, arg2);

                return(result);
            }
            if (count == 4 &&
                LuaStatic.CheckType(L, typeof(UnityEngine.Vector3), 2) &&
                LuaStatic.CheckType(L, typeof(Single), 3) &&
                LuaStatic.CheckType(L, typeof(UnityEngine.Space), 4))
            {
                UnityEngine.Transform obj  = LuaStatic.GetObj(L, 1) as UnityEngine.Transform;
                UnityEngine.Vector3   arg1 = (UnityEngine.Vector3)LuaStatic.GetObj(L, 2);
                Single            arg2     = (Single)(double)(LuaStatic.GetObj(L, 3));
                UnityEngine.Space arg3     = (UnityEngine.Space)(double)(LuaStatic.GetObj(L, 4));
                obj.Rotate(arg1, arg2, arg3);

                return(result);
            }
            LuaStatic.traceback(L, "count not enough");
            LuaDLL.lua_error(L);
            return(result);
        }