Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Application.LoadLevel(""); - doesn't load my Scene

$
0
0
Hi, I want back to my menue when I lost my game, so when the time up. But timer disappears when the time is zero, so that works but it doesn't load my menue/scene. Can anyone help me please :) timer.js #pragma strict import UnityEngine.UI; var countdown : float; var timer : UI.Text; function Start () { } function Update() { timer = GetComponent(UI.Text); countdown -= Time.deltaTime; var minutes = Mathf.Floor(countdown/60).ToString("00"); var seconds = (countdown % 60).ToString("00"); timer.text = minutes +":" + seconds; if(countdown <= 0.00) { timer.active=false; Application.LoadLevel("Lostgame"); } }

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>