예제 #1
0
 void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag("Player"))
     {
         playerVida.Daño(DañoE);
     }
     if (collision.CompareTag("bala"))
     {
         player.GetComponent <movimiento>().municion += 5;
         Destroy(gameObject);
     }
 }