Health Regen

Hi my health regen code will not regen health in a full 1 number it regens it really fast in 0.01 number so the decimal in the health is visible i do not want that. here is an example.

 class health : mono{

float health;
float regen;
float maxhealth = 100;

void start(){
health = 100;
regen = 1;

void Update(){
if(health < maxhealth & health > 0){
health += regen * Time.DeltaTime;

i have tried to put a Mathf.Round in place but it does not work any pointers? i code in C#

You can cast your variable to just return INT number.


int health;
health = (int) Mathf.Clamp01(Time.DeltaTime * 0.5);