
上QQ阅读APP看书,第一时间看更新
Time for action — rendering the rockets
Implement a call to the function RenderRockets
, inside the RenderGame
method.
RenderLaunchers() RenderRockets() Return True
What just happened?
One call inside the RenderGame
function, and all rockets that exist are drawn to the canvas. Save the file and let it run. Press A or S and you will see rockets flying to your mouse position, as long as some rockets are remaining.