I have three hearts on my GUI. If the player is hit, he/she looses one life point, setting the first two hearts to red and the third one to an empty heart. The process continues until the player has ran out of life points. It's all controlled by one variable.
What I am wondering is, if there is a simpler way to implement this?
Will this code cause lag on my GUI? If I understand this correctly, the hearts are being placed there every frame?