Closed vsmart closed 7 years ago
I guess there's a few ways of achieving this, I wonder if we ought to present a few recipes for different approaches?
As a bonus it could invite the learner to consider the trade-offs (i.e. if you block the loop with an animation you can't collect mouse events), possibly with a lead-in to fun-mode (i.e. animation tick as state).
Ah - just realised user-interaction doesn't happen until next week! Perhaps that bonus is a bit early! Well maybe this lesson could lay the groundwork...
I was thinking of just using (frame-count)
for this instead of incrementing the state? So we can save state for the week after.
Done 💯
Learning Goal
The topic of week 2 is drawing a simple animation: a moving ball, beating heart, etc.
Todo in preparation