Example #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);
        }
Example #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);
        }
Example #3
0
 public void ExecuteCommand(APICmd cmd)
 {
     this.ExecuteCommand <Object>(cmd, defaultHandler);
 }