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