Hi, David.
Thanks for the message.
To answer your question, the code you see in the book does indeed match the intent behind it.
For this label, I wanted a very subtle fade in effect to help prevent a jarring visual response from the player. The 0.05 seconds works to achieve this.
Of course, if you’d rather skip the fadeIn
action, increase its duration, or use a wait
action instead, that works too.
It’s always fun to see what others come up with on their own. There was a reader on Twitter who shared his progress with the game, and he added some extra code that randomly changes the text. I thought it was well done and added some extra charm to our blobby little green friend.
Thanks again for your comments. I appreciate all of the feedback you’re giving about this book.
EDIT: My apologies, I looked a little closer at the code, and you’re right—I am missing the initial setting of chomp.alpha = 0.0
. You’ll see this correction in the next update.