Advertisement
Guest User

Untitled

a guest
Jun 25th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. void OnCollisionEnter(Collision col)
  2. {
  3. if (col.gameObject.name == "Planet") //++
  4. {
  5. Debug.Log("Collided!");
  6.  
  7. if (player.velocity.magnitude >= 6)
  8. {
  9. EditorUtility.DisplayDialog("GAME OVER", "You crashed at high speeds!", "Darn heck...", "Ouch oof");
  10. Time.timeScale = 0;
  11. }
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement