コード例 #1
0
    static int CreateCharacterBaseInfo(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1 && TypeChecker.CheckTypes(L, typeof(Logic.Player.Model.PlayerInfo)))
            {
                Logic.Player.Model.PlayerInfo           arg0 = (Logic.Player.Model.PlayerInfo)ToLua.ToObject(L, 1);
                Logic.Character.Model.CharacterBaseInfo o    = Logic.Character.Model.CharacterBaseInfo.CreateCharacterBaseInfo(arg0);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 1 && TypeChecker.CheckTypes(L, typeof(Logic.Hero.Model.HeroInfo)))
            {
                Logic.Hero.Model.HeroInfo arg0            = (Logic.Hero.Model.HeroInfo)ToLua.ToObject(L, 1);
                Logic.Character.Model.CharacterBaseInfo o = Logic.Character.Model.CharacterBaseInfo.CreateCharacterBaseInfo(arg0);
                ToLua.PushObject(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Logic.Character.Model.CharacterBaseInfo.CreateCharacterBaseInfo"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static int GetEnemyPlayerInfo(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Logic.Character.Controller.EnemyController obj = (Logic.Character.Controller.EnemyController)ToLua.CheckObject(L, 1, typeof(Logic.Character.Controller.EnemyController));
         Logic.Player.Model.PlayerInfo o = obj.GetEnemyPlayerInfo();
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }