public uint Execute(PacketDistributed ipacket) { GC_MONEYTREE_DATA packet = (GC_MONEYTREE_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_MONEYTREE_DATA packet) { MoneyTreeID = packet.CurTurnID; CDTime = packet.AwardCDTime; int nRet = packet.Ret; YuanBaoAwardCount = packet.YuanBaoCount; if (m_nMoneyTreeID < 0 || m_nMoneyTreeID > 20) { UIManager.CloseUI(UIInfo.MoneyTreeRoot); if (FunctionButtonLogic.Instance()) { FunctionButtonLogic.Instance().UpdateMoneyTreeButton(); } } // 通知UI按钮 显示提醒 if (null != FunctionButtonLogic.Instance()) { FunctionButtonLogic.Instance().UpdateButtonAwardTips(); } if (nRet == 1) { if (BackCamerControll.Instance() != null) { BackCamerControll.Instance().PlaySceneEffect(96); } if (null != GameManager.gameManager.SoundManager) { GameManager.gameManager.SoundManager.PlaySoundEffect(129); //pickup_coin } } else { if (FunctionButtonLogic.Instance()) { FunctionButtonLogic.Instance().UpdateMoneyTreeButton(); } } }