Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Vector3 textScaleSave = new Vector3(timer.transform.localScale.x,timer.transform.localScale.y,timer.transform.localScale.z);
  2. static_datas.timer += Time.fixedTime - lastTime;
  3. int gameTimerTime = (int)static_datas.timer;
  4. if(gameTimerTime/60<10)
  5. {
  6. if(gameTimerTime%60<10)
  7. {
  8. timer.text = "0"+gameTimerTime/60 +":0"+ gameTimerTime%60;
  9. }
  10. else
  11. {
  12. timer.text = "0"+gameTimerTime/60 +":"+ gameTimerTime%60;
  13. }
  14. }
  15. else
  16. {
  17. if(gameTimerTime%60<10)
  18. {
  19. timer.text = gameTimerTime/60 +":0"+ gameTimerTime%60;
  20. }
  21. else
  22. {
  23. timer.text = gameTimerTime/60 +":"+ gameTimerTime%60;
  24. }
  25. }
  26. timer.transform.localScale = new Vector3(textScaleSave.x,textScaleSave.y,textScaleSave.z);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement