Ejemplo n.º 1
0
        protected override void OnReceive(Packet packet)
        {
            try
            {
                if (false == handlers.ContainsKey(packet.Id))
                {
                    Debug.Log("can't find registered msg(id:" + packet.Id + ")");
                    return;
                }

                IPacketHandler handler = handlers[packet.Id];
                handler.OnReceive(packet);
            }
            catch (System.Exception e)
            {
                Error(e);
            }
        }