Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* This script is licensed under the BSD license.
- Author: Cody Dostal
- Author Email: allysman21@gmail.com
- Date Written: 4/22/2012
- Date Last Edited: 4/24/2012
- Engine Version: 3.5.1f2
- Script Version: v1.1
- */
- /* NOTE: With good chance, you may have to change any hard-coded values in these scripts.
- These values work with my version, and may not with your version. */
- import UnityEngine
- class Instructions1 (MonoBehaviour):
- // Setting up strings for the Instruction screen.
- private infoText as string = "Controls: \n Press left, right, up, and down arrows to move. \n Press Spacebar, Right Control, or your Left Mouse Button to fire. \n Press Left Shift to speed up, and Left Control to slow down."
- private pntText as string = "Points: \n You gain points by destroying Meteors. \n You lose 300 points by dying. \n You lose 100 points by missing a meteor."
- private winLose as string = "How to Win: \n You win by getting 5000 points. \n You lose only if you lose all your lives."
- // Setting up variables for the labels. Found in Editor, changed to private and set in here.
- private infoHeight as single = 150
- private infoWidth as single = 250
- private pntHeight as single = 150
- private pntWidth as single = 250
- private winLoseHeight as single = 150
- private WinLoseWidth as single = 250
- def OnGUI ():
- GUI.Label(Rect(140, 10, infoWidth, infoHeight), infoText)
- GUI.Label(Rect(140, 135, pntWidth, pntHeight), pntText)
- GUI.Label(Rect(140, 220, infoWidth, infoHeight), winLose)
- // If you click the "Menu" button, load the Menu
- if GUI.Button(Rect(Screen.width - 125, Screen.height - 75, 100, 50), "Menu"):
- Application.LoadLevel(0)
- // If you click the "Start" button, load the game.
- if GUI.Button(Rect(10, Screen.height -75, 100, 50), "Start!"):
- Application.LoadLevel(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement