// Use this for initialization
 void Awake()
 {
     guardBlackboard  = GetComponent <GuardBlackboard>();
     globalBlackboard = FindObjectOfType <GlobalBlackboard>();
     agent            = GetComponent <NavMeshAgent>();
     behaviourTree    = InitializeBahaviourTree();
 }
Exemplo n.º 2
0
    private void Awake()
    {
        guardBlackboard  = GetComponent <GuardBlackboard>();
        globalBlackboard = GetComponent <GlobalBlackboard>();
        guardBlackboard.m_playerInSight = false;

        sphereCollider = GetComponent <SphereCollider>();
        player         = GameObject.FindGameObjectWithTag("Player");
    }
    public PickLocation(ref GuardBlackboard guardBlackboard, ref NavMeshAgent agent)
    {
        m_guardBlackboard = guardBlackboard;
        m_agent           = agent;
        patrolLocations   = GameObject.FindGameObjectsWithTag(m_guardBlackboard.m_patrolPoints);

        dest = Random.Range(0, patrolLocations.Length);
        m_guardBlackboard.m_destination = patrolLocations[dest].transform.position;
    }
Exemplo n.º 4
0
 public IsFriendlyNearby(ref GuardBlackboard _guardBlackboard, ref GlobalBlackboard _globalBlackboard)
 {
     guardBlackboard  = _guardBlackboard;
     globalBlackboard = _globalBlackboard;
 }
 public ShouldConverse(ref GuardBlackboard guardBlackboard, ref NavMeshAgent agent)
 {
     m_agent           = agent;
     m_guardBlackboard = guardBlackboard;
 }
 public MoveTowards(ref GuardBlackboard guardBlackboard, ref NavMeshAgent agent)
 {
     m_guardBlackboard = guardBlackboard;
     m_agent           = agent;
 }
 public AttemptConversation(ref GuardBlackboard _guardBlackboard)
 {
     guardBlackboard = _guardBlackboard;
 }
Exemplo n.º 8
0
 public Wander(ref GuardBlackboard _guardBlackboard, ref NavMeshAgent _agent)
 {
     guardBlackboard = _guardBlackboard;
     agent           = _agent;
 }
Exemplo n.º 9
0
 public IsInSight(GuardBlackboard _guardblackboard)
 {
     guardblackboard = _guardblackboard;
 }