Advertisement
Guest User

Bex is dumb lolol

a guest
Mar 5th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #pragma strict
  2.  
  3. public var cam1 : Camera; //Set the player camera as this in the inspector
  4. public var cam2 : Camera; //Set the death camera as this in the inspector
  5.  
  6. function Update () {
  7. if (Input.GetKeyDown ("space")) // Checks for key input (this can be changed to another key)
  8. Application.LoadLevel ("main"); //Loadlevel ("LevelName") Change main to the name of your level
  9. cam1.enabled = true; //Sets the camera to the player
  10. cam2.enabled = false; //Disables the death camera
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement