I have a Bool “touched”. I also have a Float “score”.
In the Update() function I have done:
score = score + 1;
However, because this is in the update function, the score continues to rise by a value of 1 for as long as the boolean is true.
How can I increment the score JUST by 1 when the boolean becomes true?