Esempio n. 1
0
    /// <summary>
    /// Checks whether the target exists in the scene or the initial state will set to wander.
    /// </summary>
    private bool CheckTargetExistene()
    {
        // targetAssigner.AssignTarget(GameManager.Instance.sceneController.playerController.gameObject); //TODO: convert this to a more dynamic target assigner
        if (targetFinder.GetTarget() == null)
        {
            controller.SetState <AIWander>();
            return(false);
        }

        return(true);
    }
Esempio n. 2
0
 private void CheckForNewTarget()
 {
     Debug.Log("Checking for new target");
     targetFinder.FindTarget();
     if (targetFinder.GetTarget() != null)
     {
         controller.SetState <AIPursuit>();
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Sets the weapon system target
 /// </summary>
 public void SetTarget()
 {
     this.target = targetFinder.GetTarget();
     Debug.Log(target);
 }