Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float currentHealth = 60;
- void healthTrainerFloat(int maxHealth) {
- if(currentHealth < maxHealth)
- // gain half of difference
- currentHealth += (maxHealth-currentHealth)/2;
- else
- currentHealth = maxHealth;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement