private static int AddPlayer(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 2);
            EntityCreate      entityCreate = (EntityCreate)ToLua.CheckObject(L, 1, typeof(EntityCreate));
            S2c_aoi_addplayer cmd          = (S2c_aoi_addplayer)ToLua.CheckObject(L, 2, typeof(S2c_aoi_addplayer));
            entityCreate.AddPlayer(cmd);
            result = 0;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }
Exemple #2
0
    private static int set_nmsg(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            S2c_aoi_addplayer s2c_aoi_addplayer = (S2c_aoi_addplayer)obj;
            Aoi_add_normalmsg nmsg = (Aoi_add_normalmsg)ToLua.CheckObject(L, 2, typeof(Aoi_add_normalmsg));
            s2c_aoi_addplayer.nmsg = nmsg;
            result = 0;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index nmsg on a nil value");
        }
        return(result);
    }
Exemple #3
0
    private static int get_sync(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            S2c_aoi_addplayer  s2c_aoi_addplayer = (S2c_aoi_addplayer)obj;
            S2c_aoi_syncplayer sync = s2c_aoi_addplayer.sync;
            ToLua.PushObject(L, sync);
            result = 1;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index sync on a nil value");
        }
        return(result);
    }
Exemple #4
0
    private static int _CreateAoi_S2c_aoi_addplayer(IntPtr L)
    {
        int result;

        try
        {
            if (LuaDLL.lua_gettop(L) == 0)
            {
                S2c_aoi_addplayer o = new S2c_aoi_addplayer();
                ToLua.PushObject(L, o);
                result = 1;
            }
            else
            {
                result = LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Aoi.S2c_aoi_addplayer.New");
            }
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }
 public void AddPlayer(S2c_aoi_addplayer cmd)
 {
     this.entityCreate.AddPlayer(cmd);
 }