About 'Persistent Score & Lives'!

In this video (objectives)…

  1. Create UI text for lives and for score.
  2. Show the lives and score text based upon the starting values.
  3. Update lives and score when player dies or picks up coins.
  4. Apply the singleton pattern to lives and score so that they persist when player dies.

After watching (learning outcomes)…

Display and update score and lives on the UI and persist their values when player dies and respawns.

(Unique Video Reference: 31_TV_CUD)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

1 Like

Here’s my current UI. Rather than display the lives as text, I went with the traditional heart containers.

5 Likes

Privacy & Terms