Beispiel #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Pelota"))
     {
         vidas.PerderVida();
     }
 }
Beispiel #2
0
    // Update is called once per frame
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag == "bola")
        {
            jugador.Reset();
            bola.Reset();

            vidas.PerderVida();
        }
    }
Beispiel #3
0
 void OnTriggerEnter()
 {
     vidas.PerderVida();
 }
Beispiel #4
0
 // Start is called before the first frame update
 private void OnTriggerEnter()
 {
     vida.PerderVida();
 }
Beispiel #5
0
    public Vidas vidas;     //Referencia al componente vidas

    void OnTriggerEnter()
    {
        vidas.PerderVida();          //llamar el componente de las vidas, perder vida.
    }
Beispiel #6
0
    public Vidas vidas; //creamos una variable para hacer referencia al script Vidas y usar sus metodos

    private void OnTriggerEnter(Collider collider)
    {
        vidas.PerderVida(collider);
    }
Beispiel #7
0
 private void OnTriggerEnter()
 {
     // Llamamos el método perder vidas una vez que la pelota tocó el suelo
     vidas.PerderVida();
 }
 void OnTriggerEnter( )
 {
     vidas.PerderVida();
     error.Play();
 }