Today I continued by yesterday work, solving the problem of score board. After trying a few ways to display scores in array, finally I found the right way to do it. The previous problem why the score cant be displayed was due to some logic errors. I had set the condition at the wrong way. I called the viewScore function when it reached at the last level, but actually it supposed been called in the next frame after the last level. In order to display do so, I set a new game mode called finish. When it reached the last level and the level is completed, I set the game mode to "finish". Once the OK button have been clicked, the function will just be call.
Part of the source codes
The score board with recorded scores
No comments:
Post a Comment