Пример #1
0
 static int Reset(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         InputNetworkMessageEvent obj = (InputNetworkMessageEvent)ToLua.CheckObject(L, 1, typeof(InputNetworkMessageEvent));
         obj.Reset();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #2
0
    static InputNetworkMessageEvent GetMsgEvent()
    {
        InputNetworkMessageEvent msg = m_msgPool[m_msgIndex];

        msg.Reset();

        m_msgIndex++;

        if (m_msgIndex >= m_msgPool.Length)
        {
            m_msgIndex = 0;
        }


        return(msg);
    }