Drawing the Bird
Let's start by drawing the bird. The good news is we've seen all this code before when we wrote in the Ground
class. Let's create a new class, a new instance in main.ts
, and add it to the game loop.
Update main.ts
to create a bird instance:
Then add the bird.draw()
call beneath ground.draw()
:
We draw the bird after the ground so that it appears above the ground.
The bird's looking a little boring, we'll animate it next.