Example #1
0
        private void Update()
        {
            lock (_queue)
            {
                if (_queue.Count > 0)
                {
                    NetProtocol data = _queue.Dequeue();

                    Type type = CommandType.FindCmdType(data.Key);

                    ICommand cmd = Activator.CreateInstance(type) as ICommand;

                    cmd.ReceiveExcute(data);
                }
            }
        }