コード例 #1
0
    private void Start()
    {
        patrollingAI = GetComponent <PatrollingAI>();

        CreateBehaviourTree();
        StartCoroutine(EvaluateTree());
    }
コード例 #2
0
 void SetInitialReferences()
 {
     enemyMaster  = GetComponent <EnemyMaster>();
     myWanderAI   = GetComponent <WanderingAI>();
     patrollingAI = GetComponent <PatrollingAI>();
     if (GetComponent <NavMeshAgent>() != null)
     {
         myNavMeshAgent = GetComponent <NavMeshAgent>();
     }
     checkRate = Random.Range(0.1f, 0.2f);
 }
コード例 #3
0
    void SetInitialReferences()
    {
        enemyMaster   = GetComponent <EnemyMaster>();
        myWanderingAI = GetComponent <WanderingAI>();
        patrollingAI  = GetComponent <PatrollingAI>();
        myTransform   = transform;

        if (head == null)
        {
            head = myTransform;
        }

        checkRate = Random.Range(0.8f, 1.2f);
    }