Exemplo n.º 1
0
 private void OnCollisionEnter2D(Collision2D other)
 {
     if (other.relativeVelocity.magnitude > 80)
     {
         Death.Crash();
     }
 }
Exemplo n.º 2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.name == "CarBody")
     {
         Death.Crash();
     }
 }