Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vector3 textScaleSave = new Vector3(timer.transform.localScale.x,timer.transform.localScale.y,timer.transform.localScale.z);
- static_datas.timer += Time.fixedTime - lastTime;
- int gameTimerTime = (int)static_datas.timer;
- if(gameTimerTime/60<10)
- {
- if(gameTimerTime%60<10)
- {
- timer.text = "0"+gameTimerTime/60 +":0"+ gameTimerTime%60;
- }
- else
- {
- timer.text = "0"+gameTimerTime/60 +":"+ gameTimerTime%60;
- }
- }
- else
- {
- if(gameTimerTime%60<10)
- {
- timer.text = gameTimerTime/60 +":0"+ gameTimerTime%60;
- }
- else
- {
- timer.text = gameTimerTime/60 +":"+ gameTimerTime%60;
- }
- }
- timer.transform.localScale = new Vector3(textScaleSave.x,textScaleSave.y,textScaleSave.z);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement