Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var background : Texture2D;
- var FontStyle : GUIStyle;
- var username = "pass";
- var userPass = "username";
- var center : Vector2;
- center.x = Screen.width / 2;
- center.y = Screen.height / 2;
- var BackgroundMusic : AudioClip = null;
- var BackgroundMusicVolume : float = 0.6;
- private var backgroundMusic : AudioSource = null;
- function Awake()
- {
- backgroundMusic = gameObject.AddComponent(AudioSource);
- backgroundMusic.loop = true;
- backgroundMusic.playOnAwake = true;
- backgroundMusic.clip = BackgroundMusic;
- backgroundMusic.maxVolume = BackgroundMusicVolume;
- backgroundMusic.minVolume = BackgroundMusicVolume;
- backgroundMusic.volume = BackgroundMusicVolume;
- //audio.PlayOneShot(sound);
- }
- function OnGUI(){
- GUI.Box(Rect(center.x / 2,center.y - 123,center.x / 1.01 ,center.y/ 1.8), background);
- GUI.Label (Rect (center.x - 140, center.y -100, 290, 50), "Gear For Speed", FontStyle);
- // Username
- userPass = GUI.TextField (Rect ( (center.x / 2 ) + 50, center.y -30, (center.x / 1.01) - 100, 25), userPass, 25 );
- // Password
- username = GUI.PasswordField (Rect ( (center.x / 2 ) + 50, center.y + 20, (center.x / 1.01) - 100, 25), username, "*"[0], 25);
- // Login BTN
- if(GUI.Button(Rect (center.x - 170, center.y + 65, 64, 25), "Inloggen")){
- Application.LoadLevel ("CompleteScene");
- }
- // QUIT BTN
- if(GUI.Button(Rect (center.x + 120, center.y + 65, 75, 25), "Registeren")){
- Application.Quit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement