Guest User

gui

a guest
Aug 30th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. private var buttonWidth:int = 200;
  2. private var buttonHeigh:int = 50;
  3. private var spacing:int = 100;
  4. function OnGUI()
  5. {
  6. if (GUI.Button(Rect(Screen.width/2 - buttonWidth/2, Screen.heigth/2 - buttonHeigh/2 - spacing, buttonHeigh, buttonWidth), "New Game"))
  7. {
  8. Application.LoadLevel("gamelvl1");
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment