Esempio n. 1
0
 //while triggered with obstacle
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag("obstacle"))
     {
         Instantiate(effectbad, transform.position, Quaternion.identity);
         scorecalc.getScore(-1);
     }
 }
Esempio n. 2
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.CompareTag("obstacle"))
     {
         //get 2 point
         scorecalc.getScore(2);
     }
 }