private void GoToNextPoint() { if (AreaTracker.GetCurrentPlayerArea() != null && AreaTracker.GetCurrentEnemyArea() != null) { if (_controller.GetThreatLevel() > 0 && AreaTracker.GetCurrentEnemyArea() != AreaTracker.GetCurrentPlayerArea()) { _controller.navMeshAgent.Warp(_controller.GetSpawnPointInArea(_controller.GetTargetArea()).position); } } _controller.navMeshAgent.SetDestination(_controller.GetWayPointInArea(_controller.GetTargetArea()).position); }
public string GetTargetArea() { int threatLevel = GetThreatLevel(); if (AreaTracker.GetCurrentPlayerArea() != null && AreaTracker.GetCurrentEnemyArea() != null) { if (threatLevel > 0 && AreaTracker.GetCurrentPlayerArea().GetName() != "Escape Pod") { return(AreaTracker.GetCurrentPlayerArea().GetName()); } else if (threatLevel > 0) { return("Indigo"); } } return("Dandelion"); }