Skip to content

Small updates to platformer tutorial for 3.0 #2178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arcade/examples/platform_tutorial/02_draw_sprites.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def on_draw(self):
self.clear()

# Draw our sprites
self.player_sprite.draw()
arcade.draw_sprite(self.player_sprite)


def main():
Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/platform_tutorial/09_sound.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def on_update(self, delta_time):
arcade.play_sound(self.collect_coin_sound)

# Center our camera on the player
self.camera.center(self.player_sprite.position)
self.camera.position = self.player_sprite.position

def on_key_press(self, key, modifiers):
"""Called whenever a key is pressed."""
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/platform_tutorial/step_02.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Now we can draw the sprite by adding this to our ``on_draw`` function:

.. code-block::

self.player_sprite.draw()
arcade.draw_sprite(self.player_sprite)

We're now drawing a Sprite to the screen! In the next chapter, we will introduce techniques to draw many(even hundreds of thousands) sprites at once.

Expand Down
Loading