Example #1
0
 // Use this for initialization
 void Start()
 {
     anim     = GetComponent <Animator>();
     navAgent = this.GetComponent <NavMeshAgent>();
     sight    = GetComponent <EnemySight>();
     move     = GetComponent <EnemyMoveAI>();
 }
Example #2
0
    //isBattle

    private void Start()
    {
        _tagsGlobal   = gameObject.AddComponent <TagsGlobal>();
        _tagsToIgnore = _tagsGlobal.tagsToIgnoreInBattle;
        enemyStats    = gameObject.GetComponentInParent <EnemyStats>(); //get stats from
        _tileManager  = GameObject.FindGameObjectWithTag("TileManager");

        moveScript = gameObject.GetComponentInParent <EnemyMoveAI>();

        battleManager = GameObject.FindGameObjectWithTag("BattleManager");
    }
Example #3
0
 private void Awake()
 {
     ec   = transform.root.gameObject.GetComponent <EnemyController>();
     emAI = transform.parent.Find("CheckWall").GetComponent <EnemyMoveAI>();
 }
Example #4
0
 private void Awake()
 {
     ec   = GetComponent <EnemyController>();
     emai = transform.Find("CheckWall").gameObject.GetComponent <EnemyMoveAI>();
 }