// Start is called before the first frame update void Awake() { mind = GetComponent <EnemyMind>(); searchTarget = Vector3.zero; mAgent = gameObject.GetComponent <NavMeshAgent>(); normalSpeed = mAgent.speed; }
// Start is called before the first frame update void Start() { mind = GetComponent <EnemyMind>(); sightImage = GetComponentInChildren <Image>(); hideTimeMax = hideTime; players = new List <Character>(); foreach (GameObject g in GameObject.FindGameObjectsWithTag("Player")) { Character c = g.GetComponent <Character>(); if (c != null) { players.Add(c); } } }