Example #1
0
 public override void Wound(Units attacker, float damage)
 {
     if (damage > 0f)
     {
         return;
     }
     if (this.fWarningTimer < 0f && attacker != null && attacker.isHero)
     {
         this.fWarningTimer = 2f;
         bool          flag     = false;
         IList <Units> mapUnits = MapManager.Instance.GetMapUnits(attacker.TeamType, global::TargetTag.Monster);
         if (mapUnits != null)
         {
             for (int i = 0; i < mapUnits.Count; i++)
             {
                 if (mapUnits[i] != null && (mapUnits[i].transform.position - base.transform.position).sqrMagnitude < 100f && TagManager.CheckTag(mapUnits[i], global::TargetTag.CreepsAndMinions) && mapUnits[i].UnitType != UnitType.SummonMonster)
                 {
                     flag = true;
                     break;
                 }
             }
         }
         if (!flag)
         {
             if (base.isLocalUnit)
             {
                 UIMessageBox.ShowTowerWoundWarn(this);
                 Singleton <MiniMapView> .Instance.ShowTowerMapWarn(this);
             }
             if (this.m_effectFangtouta != null && !this.m_effectFangtouta.isDestroyed)
             {
                 this.m_effectFangtouta.Destroy();
             }
             if (base.TeamType == TeamType.LM)
             {
                 this.m_effectFangtouta = ActionManager.PlayEffect("Fx_Fangtouta_LM", this, null, null, true, string.Empty, null);
             }
             else
             {
                 this.m_effectFangtouta = ActionManager.PlayEffect("Fx_Fangtouta_BL", this, null, null, true, string.Empty, null);
             }
         }
     }
     base.Wound(attacker, damage);
     this._DurationWoundMgr.OnWound(attacker, damage);
     if (this._towerController)
     {
         this._towerController.OnDamage(attacker, damage);
     }
 }
    private ActorAction CreateObj(ActorAction.ENType newType)
    {
        ActorAction action = m_pool.GetObjectFromPool(newType) as ActorAction;

        if (action != null)
        {
            return(action);
        }
        switch (newType)
        {
        case ActorAction.ENType.enStandAction:
            action = new StandAction();
            break;      //站立

        case ActorAction.ENType.enMoveAction:
            action = new MoveAction();
            break;              //移动

        case ActorAction.ENType.enAttackAction:
            action = new AttackAction();
            break;              //攻击

        case ActorAction.ENType.enSpasticityAction:
            action = new SpasticityAction();
            break;              //被动僵直

        case ActorAction.ENType.enBeAttackAction:
            action = new BeAttackAction();
            break;              //受击

        case ActorAction.ENType.enUndownAction:
            action = new UndownAction();
            break;              //霸体

        case ActorAction.ENType.enDeadAction:
            action = new DeadAction();
            break;              //死亡

        case ActorAction.ENType.enReliveAction:
            action = new ReliveAction();
            break;              //复活

        case ActorAction.ENType.enPlayEffectAction:
            action = new PlayEffectAction();
            break;              //播放特效

        case ActorAction.ENType.enSearchEnemyAction:
            //action = new SearchEnemyAction();
            break;              //搜索敌人

        case ActorAction.ENType.enTeleportAction:
            action = new TeleportAction();
            break;              //瞬移

        case ActorAction.ENType.enControlMoveAction:
            action = new ControlMoveAction();
            break;    //控制技能定身

        case ActorAction.ENType.enHoldDownAction:
            action = new HoldDownAction();
            break;            //按下状态

        case ActorAction.ENType.enSelfSpasticityAction:
            action = new SelfSpasticityAction();
            break;      //主动僵直

        case ActorAction.ENType.enAlertAction:
            action = new AlertAction();
            break;          //警戒

        case ActorAction.ENType.enJumpinAction:
            action = new JumpinAction();
            break;      //入场

        case ActorAction.ENType.enJumpoutAction:
            action = new JumpoutAction();
            break;       //退场

        case ActorAction.ENType.enRollAction:
            action = new RollAction();
            break;     //翻滚

        case ActorAction.ENType.enFakeBeAttackAction:
            action = new FakeBeAttackAction();
            break;     //假受击

        case ActorAction.ENType.enActorExitAction:
            action = new ActorExitAction();
            break; //主控角色退场

        case ActorAction.ENType.enActorEnterAction:
            action = new ActorEnterAction();
            break; //主控角色入场

        case ActorAction.ENType.enControlAttackAction:
            action = new ControlAttackAction();
            break; //不能攻击

        case ActorAction.ENType.enControlBeAttackAction:
            action = new ControlBeAttackAction();
            break; //不能受击

        case  ActorAction.ENType.enAttackingMoveAction:
            action = new AttackingMoveAction();
            break;//攻击时移动

        case  ActorAction.ENType.enDragMoveAction:
            action = new DragMoveAction();
            break;//拖拽

        default:
            throw new Exception("Miss Action Create for" + newType.ToString());
        }
        return(action);
    }
        private static void CheckSignalOverride(int senderId, TeamSignalType signalType, PlayEffectAction action)
        {
            PlayEffectAction playEffectAction;

            if (TeamSignalManager._lastAttackSignals.TryGetValue(senderId, out playEffectAction) && playEffectAction != null)
            {
                playEffectAction.Stop();
            }
            TeamSignalManager._lastAttackSignals[senderId] = action;
        }