private void Start() { // get the components on the object we need ( should not be null due to require component so no need to check ) agent = GetComponent <UnityEngine.AI.NavMeshAgent>(); character = GetComponent <ThirdPersonEnemy>(); enemy = GetComponent <Zombie>(); agent.updateRotation = false; agent.updatePosition = true; }
// Start is called before the first frame update void Start() { player = GameObject.FindGameObjectWithTag("Player"); aIEnemyControl = GetComponent <AIEnemyControl>(); thirdPersonEnemy = GetComponent <ThirdPersonEnemy>(); m_Animator = GetComponent <Animator>(); attackSFX = GetComponent <AudioSource>(); FistCol = fistComponent; ArmCol = armComponent;//GameObject.FindGameObjectWithTag("Fist"); currentHealthPoints = maxHealthPoints; }
// Start is called before the first frame update void Start() { player = GameObject.FindGameObjectWithTag("Player"); aIEnemyControl = GetComponent <AIEnemyControl>(); thirdPersonEnemy = GetComponent <ThirdPersonEnemy>(); m_Animator = GetComponent <Animator>(); attackSFX = this.GetComponent <AudioSource>(); projectileToUse.SetActive(true); tp = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); gm = GameObject.FindGameObjectWithTag("gamemanager").GetComponent <gamemanager>(); }