Ejemplo n.º 1
0
        static int _e_DoHideAnimationEvent(RealStatePtr L)
        {
            try {
                ObjectTranslator translator          = ObjectTranslatorPool.Instance.Find(L);
                int gen_param_count                  = LuaAPI.lua_gettop(L);
                DCET.Model.GWindow gen_to_be_invoked = (DCET.Model.GWindow)translator.FastGetCSObj(L, 1);
                System.Action      gen_delegate      = translator.GetDelegate <System.Action>(L, 3);
                if (gen_delegate == null)
                {
                    return(LuaAPI.luaL_error(L, "#3 need System.Action!"));
                }

                if (gen_param_count == 3)
                {
                    if (LuaAPI.xlua_is_eq_str(L, 2, "+"))
                    {
                        gen_to_be_invoked.DoHideAnimationEvent += gen_delegate;
                        return(0);
                    }


                    if (LuaAPI.xlua_is_eq_str(L, 2, "-"))
                    {
                        gen_to_be_invoked.DoHideAnimationEvent -= gen_delegate;
                        return(0);
                    }
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            LuaAPI.luaL_error(L, "invalid arguments to DCET.Model.GWindow.DoHideAnimationEvent!");
            return(0);
        }
Ejemplo n.º 2
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    DCET.Model.GWindow gen_ret = new DCET.Model.GWindow();
                    translator.Push(L, 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 DCET.Model.GWindow constructor!"));
        }