Quantcast
Channel: Answers for "Count down timer C#"
Viewing all articles
Browse latest Browse all 22

Answer by naveedabbas

$
0
0
public class Timercontroler : MonoBehaviour { public Text timer; float timeleft=300f; // Use this for initialization void Start () { } // Update is called once per frame void Update () { timeleft -= Time.deltaTime; int minute = Mathf.FloorToInt (timeleft / 60f); int second = Mathf.FloorToInt (timeleft -minute*60); timer.text = minute.ToString()+":"+second.ToString(); } }

Viewing all articles
Browse latest Browse all 22

Trending Articles



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