IEnumerator Start() { sound = GetComponent <GolenSoundController>(); anim = gameObject.GetComponent <Animator>(); golen_atack = GetComponent <Golen_atack>(); sound.playRoarSound(false); yield return(new WaitForSeconds(2f)); anim.SetTrigger("Walk"); sound.playWalkSound(true); is_alive = true; GetComponent <GolenMoviment>().enabled = true; }
void Start() { player_positon = GameObject.FindWithTag("Player").GetComponent <Transform>(); golen_atack = GetComponent <Golen_atack>(); sound = GetComponent <GolenSoundController>(); }