Esempio n. 1
0
        int UnityEngineGameObject_m_SendMessageUpwards(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.GameObject gen_to_be_invoked = (UnityEngine.GameObject)translator.FastGetCSObj(L, 1);

            if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
            {
                string _methodName = LuaAPI.lua_tostring(L, 2);

                gen_to_be_invoked.SendMessageUpwards(_methodName);



                return(0);
            }
            if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <UnityEngine.SendMessageOptions>(L, 3))
            {
                string _methodName = LuaAPI.lua_tostring(L, 2);
                UnityEngine.SendMessageOptions _options; translator.Get(L, 3, out _options);

                gen_to_be_invoked.SendMessageUpwards(_methodName, _options);



                return(0);
            }
            if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3))
            {
                string _methodName = LuaAPI.lua_tostring(L, 2);
                object _value      = translator.GetObject(L, 3, typeof(object));

                gen_to_be_invoked.SendMessageUpwards(_methodName, _value);



                return(0);
            }
            if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3) && translator.Assignable <UnityEngine.SendMessageOptions>(L, 4))
            {
                string _methodName = LuaAPI.lua_tostring(L, 2);
                object _value      = translator.GetObject(L, 3, typeof(object));
                UnityEngine.SendMessageOptions _options; translator.Get(L, 4, out _options);

                gen_to_be_invoked.SendMessageUpwards(_methodName, _value, _options);



                return(0);
            }


            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.GameObject.SendMessageUpwards!"));
        }
Esempio n. 2
0
        public static int SendMessageUpwards(IntPtr L)
        {
            int result = 1;
            int count  = LuaDLL.lua_gettop(L);

            if (count == 4 &&
                LuaStatic.CheckType(L, typeof(String), 2) &&
                LuaStatic.CheckType(L, typeof(Object), 3) &&
                LuaStatic.CheckType(L, typeof(UnityEngine.SendMessageOptions), 4))
            {
                UnityEngine.GameObject obj = LuaStatic.GetObj(L, 1) as UnityEngine.GameObject;
                String arg1 = (String)LuaStatic.GetObj(L, 2);
                Object arg2 = (Object)LuaStatic.GetObj(L, 3);
                UnityEngine.SendMessageOptions arg3 = (UnityEngine.SendMessageOptions)(double)(LuaStatic.GetObj(L, 4));
                obj.SendMessageUpwards(arg1, arg2, arg3);

                return(result);
            }
            if (count == 3 &&
                LuaStatic.CheckType(L, typeof(String), 2) &&
                LuaStatic.CheckType(L, typeof(Object), 3))
            {
                UnityEngine.GameObject obj = LuaStatic.GetObj(L, 1) as UnityEngine.GameObject;
                String arg1 = (String)LuaStatic.GetObj(L, 2);
                Object arg2 = (Object)LuaStatic.GetObj(L, 3);
                obj.SendMessageUpwards(arg1, arg2);

                return(result);
            }
            if (count == 2 &&
                LuaStatic.CheckType(L, typeof(String), 2))
            {
                UnityEngine.GameObject obj = LuaStatic.GetObj(L, 1) as UnityEngine.GameObject;
                String arg1 = (String)LuaStatic.GetObj(L, 2);
                obj.SendMessageUpwards(arg1);

                return(result);
            }
            if (count == 3 &&
                LuaStatic.CheckType(L, typeof(String), 2) &&
                LuaStatic.CheckType(L, typeof(UnityEngine.SendMessageOptions), 3))
            {
                UnityEngine.GameObject obj = LuaStatic.GetObj(L, 1) as UnityEngine.GameObject;
                String arg1 = (String)LuaStatic.GetObj(L, 2);
                UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)(double)(LuaStatic.GetObj(L, 3));
                obj.SendMessageUpwards(arg1, arg2);

                return(result);
            }
            LuaStatic.traceback(L, "count not enough");
            LuaDLL.lua_error(L);
            return(result);
        }
Esempio n. 3
0
        static int _m_SendMessageUpwards(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.GameObject gen_to_be_invoked = (UnityEngine.GameObject)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    string _methodName = LuaAPI.lua_tostring(L, 2);

                    gen_to_be_invoked.SendMessageUpwards(_methodName);



                    return(0);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <UnityEngine.SendMessageOptions>(L, 3))
                {
                    string _methodName = LuaAPI.lua_tostring(L, 2);
                    UnityEngine.SendMessageOptions _options; translator.Get(L, 3, out _options);

                    gen_to_be_invoked.SendMessageUpwards(_methodName, _options);



                    return(0);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3))
                {
                    string _methodName = LuaAPI.lua_tostring(L, 2);
                    object _value      = translator.GetObject(L, 3, typeof(object));

                    gen_to_be_invoked.SendMessageUpwards(_methodName, _value);



                    return(0);
                }
                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3) && translator.Assignable <UnityEngine.SendMessageOptions>(L, 4))
                {
                    string _methodName = LuaAPI.lua_tostring(L, 2);
                    object _value      = translator.GetObject(L, 3, typeof(object));
                    UnityEngine.SendMessageOptions _options; translator.Get(L, 4, out _options);

                    gen_to_be_invoked.SendMessageUpwards(_methodName, _value, _options);



                    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.GameObject.SendMessageUpwards!"));
        }