language: JavaScript (spidermonkey) (spidermonkey-1.7)
date: 119 days 10 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
var show : int = 1;
var showMenu : boolean = false;
var showed : boolean = false;
var windowRect =  Rect (10,10,200,400);
var text : String;
var stufe : int = 0;
var maxstufe : int = 0;
var upgradable : boolean = false;
var activestufe : int = 0;
var maxactivestufe : int = 0;
 
function Update () 
{
   if(Input.GetKeyDown("t")&&show%2==1)
   {
      showMenu=true;
      /*gameObject.GetComponet("Mouse Look").enabled=false;
      gameObject.FindWithTag("MainCamera").GetComponent("MouseLook").enabled=false;
      gameObject.FindWithTag("MainCamera").GetComponent("Lenkrakete schiessen").enabled=false;
      */
      
      Time.timeScale=0;
   }
   if(Input.GetKeyDown("t")&&show%2==0)
   {
      showMenu=false;
      Time.timeScale=1;
   }
   if(Input.GetKeyUp("t")&&show%2==1)
   {
      show+=1;
      showed=true;
   }
   if(Input.GetKeyUp("t")&&show%2==0&&!showed)
   {
      show+=1;
   }
   showed=false;
 
}
 
 
function OnGUI ()
{
   if(showMenu)
   {
      GUI.Box(Rect(200,200,400,600),"");
      GUI.Box(Rect(200,600,400,30),""+stufe+"/"+maxstufe);
      GUI.Box(Rect(200,600,400,200),"\n\n"+text);
      if(GUI.Button(Rect(210,560,40,40),""))
      {
         text="Skill 1: \nDies ist eine Testbeschreibung\nEin Level-Up kostet Unendlich viel!!";
         stufe=0;
         maxstufe=5;
         upgradable=true;
         
      }
      if(upgradable&&stufe<maxstufe)
      {
         if(GUI.Button(Rect(350,750,100,50),"Verbessern"))
         
            stufe+=1;
         
      }
      
   }
}