Hello all ! Well, I included a timer and a score in my game ( they are both displayed ) but when I start the game the score is already 1 and when I press the PLAY button in my game the score becomes 2 - I want it to be 0 until I collect a circle( like the poo game ). The problem might be in the ResetGoal func - http://pastebin.com/rSeSsEQG . This is how I drew the score - http://pastebin.com/ebK5F41y .
Unfortunately the project is 72 MB and I cannot upload it.
The score in my game doesn't display as I expected
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: The score in my game doesn't display as I expected
already gave you the answer in PM. In the Game constructor you call ResetGoal, which increments nGoal, and in StartGame you call ResetGame which calls ResetGoal which increments nGoal.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com