im creating a word game.wherein if you click the wrong button ( the button which is not belong to the answer) you will lose 1 life. you only have 3 lives. can somebody help me with my codes ? much appreciated.
Assuming it is c# you are coding i have code here that would work.
private int Health = 3;
public void Correct() {
return;
}
public void inCorrect() {
Health = Health - 1;
if (Health == 0) {
Die();
}
}
public void Die() {
//Kill Player
}
You can do the rest assuming you know how to code to.