Esempio n. 1
0
    // Use this for initialization

    void SlowUpdate()
    {
        if (m_Delay_Time > 0)
        {
            m_Delay_Time -= 0.3f;
            if (m_Delay_Time <= 0)
            {
                CG_PUT_GEM gemPacket = (CG_PUT_GEM)PacketDistributed.CreatePacket(MessageID.PACKET_CG_PUT_GEM);
                gemPacket.SetEquipslot(m_Delay_CurEquipSlot);
                gemPacket.SetIndex(m_Delay_CurGemSlot);
                gemPacket.SetItemguid(m_Delay_GemGuid);
                gemPacket.SendPacket();

                m_Delay_CurEquipSlot = 0;
                m_Delay_CurGemSlot   = 0;
                m_Delay_GemGuid      = 0;
            }
        }
    }
Esempio n. 2
0
    void OnDisable()
    {
        m_Instance            = null;
        m_NewPlayerGuide_Step = -1;
        //关闭界面时 如果有延迟发包 则直接发包
        if (m_Delay_Time > 0)
        {
            CG_PUT_GEM gemPacket = (CG_PUT_GEM)PacketDistributed.CreatePacket(MessageID.PACKET_CG_PUT_GEM);
            gemPacket.SetEquipslot(m_Delay_CurEquipSlot);
            gemPacket.SetIndex(m_Delay_CurGemSlot);
            gemPacket.SetItemguid(m_Delay_GemGuid);
            gemPacket.SendPacket();

            m_Delay_CurEquipSlot = 0;
            m_Delay_CurGemSlot   = 0;
            m_Delay_GemGuid      = 0;
        }

        //关闭界面时 如果有UI特效播放 则关闭特效
        if (BackCamerControll.Instance())
        {
            BackCamerControll.Instance().StopSceneEffect(133, true);
        }

        CancelInvoke("SlowUpdate");
        if (m_RuneAbsorb != null)
        {
            m_RuneAbsorb.SetActive(false);
        }
        if (EquipStrengthenLogic.Instance() != null)
        {
            EquipStrengthenLogic.Instance().ClearGemsInEquips();
        }
        if (EquipStrengthenLogic.Instance() != null)
        {
            EquipStrengthenLogic.Instance().ReSelectEquip();
        }
    }