Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnCollisionEnter(Collision col)
- {
- if (col.gameObject.name == "Planet") //++
- {
- Debug.Log("Collided!");
- if (player.velocity.magnitude >= 6)
- {
- EditorUtility.DisplayDialog("GAME OVER", "You crashed at high speeds!", "Darn heck...", "Ouch oof");
- Time.timeScale = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement