コード例 #1
0
        public void __Gen_Delegate_Imp15(Engine.ISprite p0, object p1)
        {
#if THREAD_SAFT || HOTFIX_ENABLE
            lock (luaEnv.luaEnvLock)
            {
#endif
            RealStatePtr L = luaEnv.rawL;
            int err_func   = LuaAPI.load_error_func(L, errorFuncRef);
            ObjectTranslator translator = luaEnv.translator;

            LuaAPI.lua_getref(L, luaReference);

            translator.Push(L, p0);
            translator.PushAny(L, p1);

            int __gen_error = LuaAPI.lua_pcall(L, 2, 0, err_func);
            if (__gen_error != 0)
            {
                luaEnv.ThrowExceptionFromError(err_func - 1);
            }



            LuaAPI.lua_settop(L, err_func - 1);

#if THREAD_SAFT || HOTFIX_ENABLE
        }
#endif
        }
コード例 #2
0
        static int _m_CreateSprite(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            Engine.AssetManager __cl_gen_to_be_invoked = (Engine.AssetManager)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 5 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <Engine.CreateSpriteEvent>(L, 3) && translator.Assignable <object>(L, 4) && translator.Assignable <Engine.TaskPriority>(L, 5))
                {
                    string strSpriteName = LuaAPI.lua_tostring(L, 2);
                    Engine.CreateSpriteEvent callBack = translator.GetDelegate <Engine.CreateSpriteEvent>(L, 3);
                    object custumParam = translator.GetObject(L, 4, typeof(object));
                    Engine.TaskPriority ePriority; translator.Get(L, 5, out ePriority);

                    Engine.ISprite __cl_gen_ret = __cl_gen_to_be_invoked.CreateSprite(strSpriteName, callBack, custumParam, ePriority);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <Engine.CreateSpriteEvent>(L, 3) && translator.Assignable <object>(L, 4))
                {
                    string strSpriteName = LuaAPI.lua_tostring(L, 2);
                    Engine.CreateSpriteEvent callBack = translator.GetDelegate <Engine.CreateSpriteEvent>(L, 3);
                    object custumParam = translator.GetObject(L, 4, typeof(object));

                    Engine.ISprite __cl_gen_ret = __cl_gen_to_be_invoked.CreateSprite(strSpriteName, callBack, custumParam);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <Engine.CreateSpriteEvent>(L, 3))
                {
                    string strSpriteName = LuaAPI.lua_tostring(L, 2);
                    Engine.CreateSpriteEvent callBack = translator.GetDelegate <Engine.CreateSpriteEvent>(L, 3);

                    Engine.ISprite __cl_gen_ret = __cl_gen_to_be_invoked.CreateSprite(strSpriteName, callBack);
                    translator.Push(L, __cl_gen_ret);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to Engine.AssetManager.CreateSprite!"));
        }
コード例 #3
0
        static int _m_GetSprite(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            Engine.ISprite __cl_gen_to_be_invoked = (Engine.ISprite)translator.FastGetCSObj(L, 1);


            try {
                {
                    UnityEngine.Sprite __cl_gen_ret = __cl_gen_to_be_invoked.GetSprite(  );
                    translator.Push(L, __cl_gen_ret);



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