コード例 #1
0
    static int inTeam(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        OneByOne.SelectRoomDTO obj = (OneByOne.SelectRoomDTO)LuaScriptMgr.GetNetObjectSelf(L, 1, "OneByOne.SelectRoomDTO");
        int arg0 = (int)LuaScriptMgr.GetNumber(L, 2);
        int o    = obj.inTeam(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
コード例 #2
0
    static int _CreateOneByOne_SelectRoomDTO(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            OneByOne.SelectRoomDTO obj = new OneByOne.SelectRoomDTO();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: OneByOne.SelectRoomDTO.New");
        }

        return(0);
    }
コード例 #3
0
    static int get_teamTwo(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.SelectRoomDTO obj = (OneByOne.SelectRoomDTO)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name teamTwo");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index teamTwo on a nil value");
            }
        }

        LuaScriptMgr.PushArray(L, obj.teamTwo);
        return(1);
    }
コード例 #4
0
    static int set_teamOne(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.SelectRoomDTO obj = (OneByOne.SelectRoomDTO)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name teamOne");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index teamOne on a nil value");
            }
        }

        obj.teamOne = LuaScriptMgr.GetArrayObject <OneByOne.SelectModel>(L, 3);
        return(0);
    }