예제 #1
0
        public void OnInjectLifeHero(ULifeHeroInjectHeroData msg)
        {
            if (msg == null || m_isPlayingEffect)
            {
                return;
            }

            m_injectMsgData = msg;
            if (this.gameObject.activeSelf)
            {
                StartCoroutine(PlayEffect());
            }
            else
            {
                Debug.Log("culturewndview is inactive so not play effect.");
            }
        }
예제 #2
0
        public void OnUpdateLifeHero(IntPtr ptr, int nLen)
        {
            IntPtrVaArgParseHelper   helper   = new IntPtrVaArgParseHelper(ptr, nLen);
            cmd_entity_lifehero_info lifeHero = helper.get <cmd_entity_lifehero_info>();

            if (!m_LifeHeroDic.ContainsKey(lifeHero.nHeroID))
            {
                m_LifeHeroDic.Add(lifeHero.nHeroID, lifeHero);

                SetLifeHeroFlag();
            }
            else
            {
                m_LifeHeroDic[lifeHero.nHeroID] = lifeHero;
            }

            ULifeHeroInjectHeroData msg = new ULifeHeroInjectHeroData();

            msg.msgID    = (int)WndMsgID.WND_MSG_LIFEHERO_INJECT;
            msg.lifeHero = lifeHero;
            UISystem.Instance.SendTargetWndMessage(WndID.WND_ID_LIFE_HERO_CULTURE, WndMsgID.WND_MSG_LIFEHERO_INJECT, msg);
        }