示例#1
0
文件: Patrol.cs 项目: SanyaIV/Flicker
    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);
    }
示例#2
0
    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");
    }