How do you repeatedly check whether a variable has changed?
Currently I'm using a hook class from a game engine to access the score like so:
float score = ScoreController::scores().points.current();
The function is only called once from the AppDelegate, so I need a method to continuously check if the score then changes after I find out what it is, but I'm unsure how to approach this?
I'm thinking the logic would be:
//store current score (as above)
//if score increases (not sure how to check)
//do something
Thanks for your help.