public uint Execute(PacketDistributed ipacket) { CG_DAILYLUCKYDRAW_DRAW packet = (CG_DAILYLUCKYDRAW_DRAW )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
public void UpdateTurnTable() { m_fFrameTimeDiff += m_fRoteateTimeDiffOne; //需要显示抽取一次的旋转效果 if (m_bShowDrawOneTurnTable && m_nMaxArrawTurnCount > 0) { //旋转一次时间差到了 if (m_fFrameTimeDiff >= m_fRoteateTimeDiffOne) { m_fFrameTimeDiff = 0; if (!m_bBonusEffectShow) { //全部关闭状态 CloseAllBonusBox(); //设置高亮 if (m_nArrawTurnCount >= 0 && m_nArrawTurnCount < m_nMaxBonusBoxCount) { m_BonusBoxArray[m_nArrawTurnCount].spriteName = m_HoverSpriteName; } } m_nArrawTurnCount++; //旋转的次数达到最大值 发送消息包 if (m_nArrawTurnCount == m_nMaxBonusBoxCount) { m_bBonusEffectShow = true; CG_DAILYLUCKYDRAW_DRAW packet = (CG_DAILYLUCKYDRAW_DRAW)PacketDistributed.CreatePacket(MessageID.PACKET_CG_DAILYLUCKYDRAW_DRAW); packet.SetDrawtype((int)m_nDrawOneType); packet.SendPacket(); } } } //需要显示抽取十次的旋转效果 else if (m_bShowDrawTenTurnTalbe) { //旋转一次时间差到了 if (m_fFrameTimeDiff >= m_fRoteateTimeDiffTen) { m_fFrameTimeDiff = 0; if (!m_bBonusEffectShow) { //全部关闭状态 CloseAllBonusBox(); //设置高亮 if (m_nArrawTurnCount % 2 == 0) { for (int nIndex = 0; nIndex < m_nMaxBonusBoxCount;) { m_BonusBoxArray[nIndex].spriteName = m_HoverSpriteName; nIndex += 2; } } else { for (int nIndex = 1; nIndex < m_nMaxBonusBoxCount;) { m_BonusBoxArray[nIndex].spriteName = m_HoverSpriteName; nIndex += 2; } } } m_nArrawTurnCount++; // 发送消息包 if (m_nArrawTurnCount == (m_nMaxBonusBoxCount / 2)) { m_bBonusEffectShow = true; CG_DAILYLUCKYDRAW_DRAW packet = (CG_DAILYLUCKYDRAW_DRAW)PacketDistributed.CreatePacket(MessageID.PACKET_CG_DAILYLUCKYDRAW_DRAW); packet.SetDrawtype((int)DLDDRAWTYPE.DLD_DRAWTYPE_TEN); packet.SendPacket(); } } } }