mirror of
https://github.com/DragonRidersUnite/book
synced 2024-11-16 07:47:42 +01:00
fix(ch03): clarity with method naming
This commit is contained in:
parent
0c02c8d24e
commit
3da81f8190
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ Outputting info to the console isn't that helpful for the player, but can you be
|
|||
|
||||
We want to display a fireball on the screen when the action key is pressed. We've got most of the code, all we need to do is change `puts` to instead display the fireball.
|
||||
|
||||
At the top of `#tick` (`#name` is Ruby shorthand for "the name method"), assign an empty array to `args.state.fireballs` if nothing has been assigned yet. This will let us keep track of fireballs across the game loop to do all sorts of things with them (display them, move them, collide them with other objects):
|
||||
At the top of `#tick` (`#name` is Ruby shorthand for "the `name` method"), assign an empty array to `args.state.fireballs` if nothing has been assigned yet. This will let us keep track of fireballs across the game loop to do all sorts of things with them (display them, move them, collide them with other objects):
|
||||
|
||||
``` ruby
|
||||
{{#include code/chapter_03/03_displaying_fireballs/app/main.rb:1:4}}
|
||||
|
|
Loading…
Reference in a new issue