Example #1
0
    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;
    }
Example #2
0
 void Start()
 {
     player_positon = GameObject.FindWithTag("Player").GetComponent <Transform>();
     golen_atack    = GetComponent <Golen_atack>();
     sound          = GetComponent <GolenSoundController>();
 }