Esempio n. 1
0
 void Start()
 {
     estado  = Estados.iddle;
     sonidos = GetComponent <WenSound>();
     asignarHash();
     rb        = GetComponent <Rigidbody2D>();          //accedemos al rigidbody
     animator  = GetComponent <Animator>();             //accedemos al animator
     attackHit = this.transform.GetChild(0).gameObject; //accedemos al hijo attackhit
     attackHit.SetActive(false);                        //desactivamos por defecto attackHit
     animator.SetFloat(lookYHash, -1);                  //situamos al personaje mirando hacia abajo
     atributosWen = GetComponent <AtributosWen>();
     //direccionX = animator.GetFloat(lookXHash);
     //direccionY = animator.GetFloat(lookYHash);
 }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     sonidos = GetComponentInParent <WenSound>();
 }