Exemplo n.º 1
0
 static int Close(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 1);
     Teacher.ByteBuffer obj = (Teacher.ByteBuffer)LuaScriptMgr.GetNetObjectSelf(L, 1, "Teacher.ByteBuffer");
     obj.Close();
     return(0);
 }
Exemplo n.º 2
0
 static int SendMessage(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 2);
     Teacher.Manager.NetworkManager obj  = (Teacher.Manager.NetworkManager)LuaScriptMgr.GetUnityObjectSelf(L, 1, "Teacher.Manager.NetworkManager");
     Teacher.ByteBuffer             arg0 = (Teacher.ByteBuffer)LuaScriptMgr.GetNetObject(L, 2, typeof(Teacher.ByteBuffer));
     obj.SendMessage(arg0);
     return(0);
 }
Exemplo n.º 3
0
 static int ToBytes(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 1);
     Teacher.ByteBuffer obj = (Teacher.ByteBuffer)LuaScriptMgr.GetNetObjectSelf(L, 1, "Teacher.ByteBuffer");
     byte[]             o   = obj.ToBytes();
     LuaScriptMgr.PushArray(L, o);
     return(1);
 }
Exemplo n.º 4
0
 static int WriteBytes(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 2);
     Teacher.ByteBuffer obj   = (Teacher.ByteBuffer)LuaScriptMgr.GetNetObjectSelf(L, 1, "Teacher.ByteBuffer");
     byte[]             objs0 = LuaScriptMgr.GetArrayNumber <byte>(L, 2);
     obj.WriteBytes(objs0);
     return(0);
 }
Exemplo n.º 5
0
    static int AddEvent(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        int arg0 = (int)LuaScriptMgr.GetNumber(L, 1);

        Teacher.ByteBuffer arg1 = (Teacher.ByteBuffer)LuaScriptMgr.GetNetObject(L, 2, typeof(Teacher.ByteBuffer));
        Teacher.Manager.NetworkManager.AddEvent(arg0, arg1);
        return(0);
    }
Exemplo n.º 6
0
    static int WriteInt(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Teacher.ByteBuffer obj = (Teacher.ByteBuffer)LuaScriptMgr.GetNetObjectSelf(L, 1, "Teacher.ByteBuffer");
        int arg0 = (int)LuaScriptMgr.GetNumber(L, 2);

        obj.WriteInt(arg0);
        return(0);
    }
Exemplo n.º 7
0
    static int ReadBuffer(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        Teacher.ByteBuffer obj = (Teacher.ByteBuffer)LuaScriptMgr.GetNetObjectSelf(L, 1, "Teacher.ByteBuffer");
        LuaStringBuffer    o   = obj.ReadBuffer();

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Exemplo n.º 8
0
    static int WriteBuffer(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Teacher.ByteBuffer obj  = (Teacher.ByteBuffer)LuaScriptMgr.GetNetObjectSelf(L, 1, "Teacher.ByteBuffer");
        LuaStringBuffer    arg0 = LuaScriptMgr.GetStringBuffer(L, 2);

        obj.WriteBuffer(arg0);
        return(0);
    }
Exemplo n.º 9
0
    static int _CreateTeacher_ByteBuffer(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            Teacher.ByteBuffer obj = new Teacher.ByteBuffer();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else if (count == 1)
        {
            byte[]             objs0 = LuaScriptMgr.GetArrayNumber <byte>(L, 1);
            Teacher.ByteBuffer obj   = new Teacher.ByteBuffer(objs0);
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: Teacher.ByteBuffer.New");
        }

        return(0);
    }