Thursday, March 25, 2021

Easy

 Had something of a coding victory, today: added - to PlayState - the brick

collision code in a version amenable to the keybrick. With precisely the result

I wanted. The keybrick gets hit, the score goes up by 1000, the keybrick disappears.

Just need to put a condition on it: the score should only go up once the

key icon has been acquired by player. Tomorrow's problem...


What was nice here: just changed references from brick to self.powerup. Brick is

one of ipairs whereas powerup is unique.  Also dropped the Brick:hi() function.




That was easy! 👵

No comments: