Exemplo n.º 1
0
        private void trackHandler(APICmd cmd, Action <CmdId, object> handler)
        {
            var seqNr = (ushort)((handledMessageCount++ % 30000) + offset);

            actionTracker[seqNr] = handler;
            GameAPI.Game_Request(cmd.cmd, seqNr, cmd.data);
        }
Exemplo n.º 2
0
        public void ExecuteCommand <ResponseType>(APICmd cmd, Action <CmdId, ResponseType> handler)
        {
            Action <CmdId, object> outerHandler = (x, y) => handler(x, (ResponseType)y);

            trackHandler(cmd, outerHandler);
        }
Exemplo n.º 3
0
 public void ExecuteCommand(APICmd cmd)
 {
     this.ExecuteCommand <Object>(cmd, defaultHandler);
 }