Day 12 – Adding in points, score, and wave numbers

day12_points_waves

Hello again,

This is the penultimate part of this game. Adding a scoreboard to the game is as simple as anything else so far. For the exception that it took a lot of time for me to get the score and the wave counter to work properly.

This due to the fact that I didn’t set the score text and the wave text objects to their proper variables in the Game Controller object. I was instead looking in the script also named game controller to set the variables.

But in the end, I figured it out and as you can see it works perfectly.

points_waves_code

As usual it’s not much code to talk about and the font was provided to me by the accompanying resource to the book.

End day 12

Kommentera

E-postadressen publiceras inte. Obligatoriska fält är märkta *