- Home /
 
               Question by 
               davidflynn2 · Oct 13, 2012 at 11:38 PM · 
                c#health  
              
 
              C# add helth over time
This is a snip it from my current shield health and what I am trying to figure out how to do is add heath back to curShieldHealth over 10 seconds. In that 10 second period I would like the curShieldHelth to get back to 100.
 public int shieldHealthMax = 100;
 public int curShieldHealth = 100;
 
     
     
     void Update () 
     {
         
         if(curShieldHealth == 0)
         {
             
         }
         
     }
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Bulgroz · Oct 13, 2012 at 11:45 PM
Would it not be good to have a coroutine running that just adds 10% health per second, provided it is lower than or equal to 90% ?
/ Chris
Your answer
 
 
             Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Problems With Health pack Script 1 Answer
Disabling scripts 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                