Advertisement
Guest User

Untitled

a guest
Jun 16th, 2011
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. function DestroyObject(object:GameObject)
  2. {
  3. //the '5' is how long you want to delay the Destroy command
  4. //(it only works for the destroy command)
  5. Destroy(object,5);
  6. }
  7. //now declare that in the 'if' statement
  8. if(GUI.Button(Rect (130,40,80,20), "Yeah"))
  9. {
  10. //again, cube is a varible defined elsewhere
  11. DestroyObject(Cube);
  12. }
  13. function OnGUI () {
  14. // Make a background box
  15. GUI.Box (Rect (10,10,300,90), "Do You Want To Go To the Next Level?");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement