示例#1
0
 protected override Monster GetMonster()
 {
     if (target == null || target.IsDead || Vector3.Distance(shootPoint.transform.position, target.transform.position) > attackRange)
     {
         return(MonstersSpawnController.GetTargets(this.transform.position, attackRange).LastOrDefault());
     }
     return(target);
 }
 protected override Monster GetMonster()
 {
     foreach (var monster in MonstersSpawnController.GetTargets(this.transform.position, attackRange))
     {
         return(monster);
     }
     return(null);
 }