Ejemplo n.º 1
0
    void Start()
    {
        atributosWen = GameObject.FindGameObjectWithTag("Player").GetComponent <AtributosWen>();
        ps           = GetComponent <ParticleSystem>();
        var trigger = ps.trigger;

        trigger.enabled = true;
        trigger.SetCollider(0, atributosWen.GetComponent <CapsuleCollider2D>());
    }
Ejemplo n.º 2
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);
 }
Ejemplo n.º 3
0
 void Start()
 {
     isAlive         = true;
     atributosPlayer = GameObject.FindGameObjectWithTag("Player").GetComponent <AtributosWen>();
 }