Advertisement
MrsMcLead

Countdown Timer (from Unity 3D Student)

Dec 3rd, 2013
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //A simple countdown timer
  2. var myTimer : float = 5.0;
  3.  
  4. function Update () {
  5.  if(myTimer > 0){
  6.   myTimer -= Time.deltaTime;
  7.  }
  8.  if(myTimer <= 0){
  9.   Debug.Log("GAME OVER");
  10.  }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement