Beispiel #1
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_ONLINEAWARD_DATA packet = (GC_ONLINEAWARD_DATA )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            GameManager.gameManager.PlayerDataPool.HandlePacket(packet);

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
        public void HandlePacket(GC_ONLINEAWARD_DATA packet)
        {
            m_nOnlineAwardID = packet.OnlineAwardID;
            m_nLeftTime      = packet.LeftTime;

            // 通知UI按钮 显示提醒
            if (null != FunctionButtonLogic.Instance())
            {
                FunctionButtonLogic.Instance().UpdateButtonAwardTips();
            }

            if (null != AwardLogic.Instance() && AwardLogic.Instance().m_OnlineAwardRoot != null)
            {
                AwardLogic.Instance().UpdateTip();
                if (AwardLogic.Instance().m_OnlineAwardRoot.gameObject.activeSelf)
                {
                    AwardLogic.Instance().m_OnlineAwardRoot.ButtonOnlineAward();
                    AwardLogic.Instance().m_OnlineAwardRoot.PlayEffect(m_nOnlineAwardID);
                }
            }
        }