Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma strict
- var objective1 : boolean = false;
- var objective2 : boolean = false;
- var objective3 : boolean = false;
- var objective4 : boolean = false;
- var objective5 : boolean = false;
- var sound : AudioClip;
- function OnGUI()
- {
- if(objective1 == true)
- {
- GUI.Box(Rect(10,10, 750,150), "Get some health in the abandon shed");
- objective1Dis();
- PlaySound();
- }
- if(objective2 == true)
- {
- GUI.Box(Rect(10,10, 750,150), "Find a way into the russians secret base");
- objective2Dis();
- }
- if(objective3 == true)
- {
- GUI.Box(Rect(10,10, 750,150), "Find another way in");
- objective3Dis();
- }
- if(objective4 == true)
- {
- GUI.Box(Rect(10,10, 750,150), "Objective 4");
- objective4Dis();
- }
- if(objective5 == true)
- {
- GUI.Box(Rect(10,10, 750,150), "Objective 5");
- objective5Dis();
- }
- }
- function objective1Dis()
- {
- yield WaitForSeconds (4);
- objective1 = false;
- }
- function PlaySound() {
- audio.PlayOneShot(sound,1);
- }
- function objective2Dis()
- {
- yield WaitForSeconds (4);
- objective2 = false;
- }
- function objective3Dis()
- {
- yield WaitForSeconds (4);
- objective3 = false;
- }
- function objective4Dis()
- {
- yield WaitForSeconds (4);
- objective4 = false;
- }
- function objective5Dis()
- {
- yield WaitForSeconds (4);
- objective5 = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement