// Update is called once per frame void Update() { float offset = 0.5f; if (clear) { //net.stop = true; timer += Time.deltaTime; background.color = new Vector4(255, 255, 255, alpha + offset * Time.deltaTime); text.color = new Vector4(255, 255, 0, alpha + offset * Time.deltaTime); alpha = background.color.a; if (timer > 3f) { if (Input.GetButton("Fire1")) { if (Application.loadedLevelName == "SingleMode") { Application.LoadLevel("ReStart"); } else if (Application.loadedLevelName == "BattleRoom") { www.SetWin(); www.SetScore(2); www.ScoreUpdate(); clinet.CloseClient(); Application.LoadLevel("Lobby"); } } } } }