- Get some simple animations down
Summary:
Got a player running in a direction, then another player kicks to button click. The intention would be to kick the ball with the right timing to hit the lead. Plenty of ideas for where to go next.
Interesting Findings:
- setInterval(draw, 40) will call draw function every 40 milliseconds where you can do a "refresh" of your animations
- use addEventListener to add a click event to the canvas
- in draw, keep one player running the lead by incrementing x and y, keep the ball going towards where clicked, if clicked yet.
No comments:
Post a Comment