Exemplo n.º 1
0
        static int _g_get_UnitId(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                DCET.Model.Player gen_to_be_invoked = (DCET.Model.Player)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushint64(L, gen_to_be_invoked.UnitId);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Exemplo n.º 2
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    DCET.Model.Player gen_ret = new DCET.Model.Player();
                    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.Player constructor!"));
        }
Exemplo n.º 3
0
        static int _m_Dispose(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DCET.Model.Player gen_to_be_invoked = (DCET.Model.Player)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.Dispose(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 4
0
        static int _m_Create_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    DCET.Model.Entity _domain = (DCET.Model.Entity)translator.GetObject(L, 1, typeof(DCET.Model.Entity));
                    long _id = LuaAPI.lua_toint64(L, 2);

                    DCET.Model.Player gen_ret = DCET.Model.PlayerFactory.Create(_domain, _id);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 5
0
        static int _m_Add(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DCET.Model.PlayerComponent gen_to_be_invoked = (DCET.Model.PlayerComponent)translator.FastGetCSObj(L, 1);



                {
                    DCET.Model.Player _player = (DCET.Model.Player)translator.GetObject(L, 2, typeof(DCET.Model.Player));

                    gen_to_be_invoked.Add(_player);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 6
0
        static int _m_Get(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                DCET.Model.PlayerComponent gen_to_be_invoked = (DCET.Model.PlayerComponent)translator.FastGetCSObj(L, 1);



                {
                    long _id = LuaAPI.lua_toint64(L, 2);

                    DCET.Model.Player gen_ret = gen_to_be_invoked.Get(_id);
                    translator.Push(L, gen_ret);



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