Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function DestroyObject(object:GameObject)
- {
- //the '5' is how long you want to delay the Destroy command
- //(it only works for the destroy command)
- Destroy(object,5);
- }
- //now declare that in the 'if' statement
- if(GUI.Button(Rect (130,40,80,20), "Yeah"))
- {
- //again, cube is a varible defined elsewhere
- DestroyObject(Cube);
- }
- function OnGUI () {
- // Make a background box
- 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