Esempio n. 1
0
        public void TryActive(GameObject target)
        {
            if (target == null)
            {
                return;
            }
            if (!this.bValid)
            {
                return;
            }
            if (!string.IsNullOrEmpty(this.effect))
            {
                MinimapSys theMinimapSys = Singleton <CBattleSystem> .GetInstance().TheMinimapSys;

                if (theMinimapSys != null && theMinimapSys.CurMapType() == MinimapSys.EMapType.Mini)
                {
                    TowerHit._play_effect(this.effect, 2f, target);
                }
            }
            if (!string.IsNullOrEmpty(this.voice))
            {
                Singleton <CSoundManager> .GetInstance().PlayBattleSound2D(this.voice);
            }
            Singleton <CTimerManager> .get_instance().ResumeTimer(this.cd_timer);

            this.bValid = false;
        }
Esempio n. 2
0
        private void onDragon_Born(ActorRoot actor)
        {
            DragonNode node = this.getDragonNode(actor.ObjID, actor.ActorControl.GetActorSubSoliderType());

            DebugHelper.Assert(node != null, "onDragon_Born node == null, check out...");
            if (node != null)
            {
                node.SetData(actor.gameObject.transform.position, actor.ActorControl.GetActorSubSoliderType(), actor.ObjID, this.m_b5v5);
                node.ShowDead(actor.ActorControl.IsDeadState);
                switch (actor.ActorControl.GetActorSubSoliderType())
                {
                case 8:
                case 9:
                case 13:
                {
                    bool flag = Singleton <CBattleSystem> .instance.GetMinimapSys().CurMapType() == MinimapSys.EMapType.Mini;

                    if (flag)
                    {
                        TowerHit._play_effect("Prefab_Skill_Effects/tongyong_effects/Indicator/blin_01_c.prefab", 3f, !flag ? node.node_in_bigMap : node.node_in_smallMap);
                    }
                    Singleton <CSoundManager> .GetInstance().PlayBattleSound("Play_BaoJun_VO_Anger", null);

                    MiniMapSysUT.RefreshMapPointerBig(node.node_in_bigMap);
                    break;
                }
                }
            }
        }
Esempio n. 3
0
        public void Remove(uint id)
        {
            TowerHit towerHit = null;

            this._data.TryGetValue(id, ref towerHit);
            if (towerHit != null)
            {
                towerHit.Clear();
            }
            this._data.Remove(id);
        }
Esempio n. 4
0
        private void onDragon_Born(ActorRoot actor)
        {
            DragonNode node = this.getDragonNode(actor.ObjID, actor.ActorControl.GetActorSubSoliderType());

            DebugHelper.Assert(node != null, "onDragon_Born node == null, check out...");
            if (node != null)
            {
                node.SetData(actor.gameObject.transform.position, actor.ActorControl.GetActorSubSoliderType(), actor.ObjID, this.m_b5v5);
                node.ShowDead(actor.ActorControl.IsDeadState);
                byte actorSubSoliderType = actor.ActorControl.GetActorSubSoliderType();
                if (((actorSubSoliderType == 8) || (actorSubSoliderType == 9)) || (actorSubSoliderType == 13))
                {
                    MinimapSys theMinimapSys = Singleton <CBattleSystem> .GetInstance().TheMinimapSys;

                    bool flag = (theMinimapSys != null) && (theMinimapSys.CurMapType() == MinimapSys.EMapType.Mini);
                    if (flag)
                    {
                        TowerHit._play_effect("Prefab_Skill_Effects/tongyong_effects/Indicator/blin_01_c.prefab", 3f, !flag ? node.node_in_bigMap : node.node_in_smallMap);
                    }
                    switch (actorSubSoliderType)
                    {
                    case 7:
                        MiniMapSysUT.SetMapElement_EventParam(node.node_in_bigMap, false, MinimapSys.ElementType.Dragon_3, actor.ObjID, 0);
                        break;

                    case 8:
                        MiniMapSysUT.SetMapElement_EventParam(node.node_in_bigMap, false, MinimapSys.ElementType.Dragon_5_big, actor.ObjID, 0);
                        break;

                    case 9:
                        MiniMapSysUT.SetMapElement_EventParam(node.node_in_bigMap, false, MinimapSys.ElementType.Dragon_5_small, actor.ObjID, 0);
                        break;
                    }
                    MiniMapSysUT.RefreshMapPointerBig(node.node_in_bigMap);
                }
                switch (actorSubSoliderType)
                {
                case 8:
                    Singleton <CSoundManager> .GetInstance().PlayBattleSound2D("Play_DaLong_VO_Refresh");

                    break;

                case 9:
                    Singleton <CSoundManager> .GetInstance().PlayBattleSound2D("Play_XiaoLong_VO_Refresh");

                    break;

                default:
                    Singleton <CSoundManager> .GetInstance().PlayBattleSound2D("Play_BaoJun_VO_Anger");

                    break;
                }
            }
        }
Esempio n. 5
0
 public void TryActive(uint id, GameObject target = null)
 {
     if (target != null)
     {
         TowerHit hit = null;
         this._data.TryGetValue(id, out hit);
         if (hit != null)
         {
             hit.TryActive(target);
         }
     }
 }
Esempio n. 6
0
        public void TryActive(uint id, GameObject target = null)
        {
            if (target == null)
            {
                return;
            }
            TowerHit towerHit = null;

            this._data.TryGetValue(id, ref towerHit);
            if (towerHit != null)
            {
                towerHit.TryActive(target);
            }
        }
Esempio n. 7
0
 public void Clear()
 {
     DictionaryView <uint, TowerHit> .Enumerator enumerator = this._data.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <uint, TowerHit> current = enumerator.get_Current();
         TowerHit value = current.get_Value();
         if (value != null)
         {
             value.Clear();
         }
     }
     this._data.Clear();
 }
Esempio n. 8
0
 public void Clear()
 {
     DictionaryView <uint, TowerHit> .Enumerator enumerator = this._data.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <uint, TowerHit> current = enumerator.Current;
         TowerHit hit = current.Value;
         if (hit != null)
         {
             hit.Clear();
         }
     }
     this._data.Clear();
 }