- Home /
 
               Question by 
               $$anonymous$$ · Apr 21, 2018 at 11:06 AM · 
                timercountdowntimer countdown  
              
 
              countdown timer
Hi, I am trying to make a script that will count down the time, for example, it will be 4 hours. After clicking the button in the game, I will add this time, for example, from 4 hours it will take 8 hours and it will be counted down to 0 but the max value of this time is 24 hours. count is the number of clicks in a game.
 void Update()
 {
     time = "04:00:00";
     info.text = "To the end:";
     czas.text = "";
     kreatyniony.text = "Creatinions: " + creatinions;
     _slider.maxValue = 240 * premium2.count;
     _slider.value = lol;
     if (x2 == 1 | x4 == 1)
     {
         StartCoroutine(Countdown());
     }
     if (premium2.count > 0)
     {
         DateTime time2 = DateTime.ParseExact(time, "HH:mm:ss", null);
     }
 }
 IEnumerator Countdown()
 {
     while (lol == 0)
     {
         yield return new WaitForSeconds(60);
         lol -= 1;
     }
 }
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
countdown timer starts from the begining when i reLaunch the app 1 Answer
how to Subtract string from TimeSpan 0 Answers
How to stop a countdown from counting down 1 Answer
countdown timer acivation 1 Answer
timer not ticking down 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                