I make a max health float and a health float. keep them private and make a function that adds health, in that function check against max health when adding to health and don’t let health be greater than max health.
I make a max health float and a health float. keep them private and make a function that adds health, in that function check against max health when adding to health and don’t let health be greater than max health.