예제 #1
0
        static int _m_SetInteger(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.Animator __cl_gen_to_be_invoked = (UnityEngine.Animator)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    int id    = LuaAPI.xlua_tointeger(L, 2);
                    int value = LuaAPI.xlua_tointeger(L, 3);

                    __cl_gen_to_be_invoked.SetInteger(id, value);



                    return(0);
                }
                if (__gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    string name  = LuaAPI.lua_tostring(L, 2);
                    int    value = LuaAPI.xlua_tointeger(L, 3);

                    __cl_gen_to_be_invoked.SetInteger(name, value);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Animator.SetInteger!"));
        }
예제 #2
0
        static StackObject *SetInteger_0(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);
            System.Int32 @value = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.String @name = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

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

            instance_of_this_method.SetInteger(@name, @value);

            return(__ret);
        }
예제 #3
0
 /// <summary>This method is called by animation clips events, this will open an close the animal eyes</summary>
 public virtual void Eyes(int ID)
 {
     animator.SetInteger(parameter, ID);
 }