// Use this for initialization void Start() { anim = GetComponent <Animator>(); navAgent = this.GetComponent <NavMeshAgent>(); sight = GetComponent <EnemySight>(); move = GetComponent <EnemyMoveAI>(); }
//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"); }
private void Awake() { ec = transform.root.gameObject.GetComponent <EnemyController>(); emAI = transform.parent.Find("CheckWall").GetComponent <EnemyMoveAI>(); }
private void Awake() { ec = GetComponent <EnemyController>(); emai = transform.Find("CheckWall").gameObject.GetComponent <EnemyMoveAI>(); }