Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma strict
- public var cam1 : Camera; //Set the player camera as this in the inspector
- public var cam2 : Camera; //Set the death camera as this in the inspector
- function Update () {
- if (Input.GetKeyDown ("space")) // Checks for key input (this can be changed to another key)
- Application.LoadLevel ("main"); //Loadlevel ("LevelName") Change main to the name of your level
- cam1.enabled = true; //Sets the camera to the player
- cam2.enabled = false; //Disables the death camera
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement