예제 #1
0
 public void Marked()
 {
     foreach (var enemy in activeEnemyList)
     {
         foreach (var player in _playerList)
         {
             if (areaCheck.CanSee(player, enemy, visionRange))
             {
                 player.marked = player.Mark;
             }
         }
     }
 }
예제 #2
0
파일: EnemyAi.cs 프로젝트: aigoia/goetita
        void BaseCloseStrike(List <Player> baseList, Enemy thisEnemy)
        {
            if (thisEnemy.currentVigor == emptyVigor)
            {
                return;
            }

            foreach (var player in baseList)
            {
                if (_areaCheck.CanSee(player, thisEnemy))
                {
                    var playNearNode = _areaCheck.NearNode(player);
                    var shortNode    = ShortNode(GameUtility.Coordinate(thisEnemy.transform.position), playNearNode);

                    if (shortNode != null)
                    {
                        StartCoroutine(AttackClose(player, thisEnemy, shortNode));
                    }
                    thisEnemy.currentVigor = emptyVigor;
                    break;
                }
            }
        }