Advertisement
Creativeeart

Untitled

Mar 26th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.73 KB | None | 0 0
  1. if (RunTime) {
  2.             scoreTime -= Time.deltaTime * 10;
  3.             ScoreTime = (int)(scoreTime);
  4.             textScore.text = ScoreTime.ToString ();
  5.         }
  6.         if (timeminute < 10) {
  7.             text.text = "0" + timeminute + ":" + timesecond;
  8.             text2.text = "0" + timeminute2+ ":" + timesecond2;
  9.         }
  10.  
  11.         if (timesecond < 10) {
  12.             text.text = timeminute + ":" + "0" + timesecond;
  13.             text2.text = timeminute2 + ":" + "0" + timesecond2;
  14.         }
  15.  
  16.         if (timeminute < 10 && timesecond < 10) {
  17.             text.text = "0" + timeminute + ":" + "0" + timesecond;
  18.             text2.text = "0" + timeminute2 + ":" + "0" + timesecond2;
  19.         }
  20.         if (timeminute >= 10 && timesecond >= 10) {
  21.             text.text = timeminute + ":" + timesecond;
  22.             text2.text = timeminute2 + ":" + timesecond2;
  23.         }
  24.  
  25.         if (RunTime){
  26.             privatetime += Time.deltaTime;
  27.  
  28.         if (reverse) {
  29.             if (privatetime >= 1) {
  30.                 timesecond -= 1;
  31.                     timesecond2 += 1;
  32.  
  33.                 privatetime = 0;
  34.                
  35.             }
  36.  
  37.             if (timesecond <= 0 && timeminute <= 0) {
  38.                 timesecond = 0;
  39.                 timeminute = 0;
  40.                 timesecond2 = 0;
  41.                 timeminute2 = 0;
  42.                     EndTime = true;
  43.                     FunctionEndTime ();
  44.                     RunTime = false;
  45.                
  46.             } else {
  47.                 if (timesecond <= 0) {
  48.                     timesecond = 59;
  49.                     timeminute -= 1;
  50.                     timeminute2 += 1;
  51.  
  52.  
  53.                 }
  54.             }
  55.         } else {
  56.             if (timesecond == secondEnd && timeminute == minuteEnd) {
  57.                 timesecond = secondEnd;
  58.                 timeminute = minuteEnd;
  59.                 privatetime = 0;
  60.                 EndTime = true;
  61.                 FunctionEndTime ();
  62.                     RunTime = false;
  63.  
  64.                
  65.             } else {
  66.                 if (privatetime >= 1) {
  67.                     timesecond += 1;
  68.                     timesecond2 += 1;
  69.  
  70.                     privatetime = 0;
  71.                    
  72.                 }
  73.                 if (timesecond >= 60) {
  74.                     timeminute += 1;
  75.                         timeminute2 += 1;
  76.  
  77.                     timesecond = 0;
  78.                         timesecond2 = 0;
  79.  
  80.                 }
  81.             }
  82.  
  83.         }
  84.     }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement