Example #1
0
    // Use this for initialization
    protected void Start()
    {
        enemiesSituation = GameObject.FindGameObjectWithTag("EnemyHandler").GetComponent <EnemiesSituation>();
        health           = GetComponent <Health>();
        stateAction      = Patrol;

        patrolPath = GetComponent <PatrolPath>();
        pathfinder = GetComponent <EnemyPathfinder>();
    }
Example #2
0
 protected void Awake()
 {
     enemyPathfinder = GetComponent <EnemyPathfinder>();
     enemyPathfinder.OnPathCompleteEvent.AddListener(OnPathCompleteEvent);
 }
Example #3
0
 private void Start()
 {
     enemyPathfinder = GetComponent <EnemyPathfinder>();
 }