Ejemplo n.º 1
0
        private void onSkillReleaseEnd(GameEvent e)
        {
            X_GUID       heroid = (X_GUID)e.data;
            UI_SkillIcon icon   = mIcons[heroid];

            if (icon)
            {
                icon.onResetCD();
            }
        }
Ejemplo n.º 2
0
        public void CreateSkillIcon(ObjectHero hero, GameObject icon)
        {
            //GameObject icon = Instantiate(iconPre, Vector3.zero, Quaternion.identity) as GameObject;
            //icon.transform.SetParent(selfTransform,false);
            //icon.transform.localScale = new Vector3(1, 1, 1);

            UI_SkillIcon skillIcon = icon.AddComponent <UI_SkillIcon>();

            skillIcon.setHero(hero);
            skillIcon.InitIcon();
            mIcons.Add(hero.GetGuid(), skillIcon);
        }
Ejemplo n.º 3
0
        // 英雄死亡处理
        public void onHeroDie(GameEvent e)
        {
            //Debug.Log("Recieve HeroDie Call ...");
            HeroData obj = (HeroData)e.data;
            //英雄死亡播放死亡音效   调用31artresource中diesound字段
            //Debug.Log(obj.TableID);
            HeroTemplate        _HeroData        = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(obj.TableID);
            ArtresourceTemplate _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(_HeroData.getArtresources());

            AudioControler.Inst.PlaySound(_Artresourcedata.getDiesound());
            if (obj != null)
            {
                UI_SkillIcon icon = mIcons[obj.GUID];
                if (icon)
                {
                    icon.OnHeroDead(obj.GUID);

                    UI_FightControler.Inst.isWaitLock(obj.GUID);
                }
            }
        }