Skip to content

Commit 16c29e5

Browse files
authored
Small updates to platformer tutorial for 3.0 (pythonarcade#2178)
1 parent c469fc2 commit 16c29e5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

arcade/examples/platform_tutorial/02_draw_sprites.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def on_draw(self):
4242
self.clear()
4343

4444
# Draw our sprites
45-
self.player_sprite.draw()
45+
arcade.draw_sprite(self.player_sprite)
4646

4747

4848
def main():

arcade/examples/platform_tutorial/09_sound.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def on_update(self, delta_time):
146146
arcade.play_sound(self.collect_coin_sound)
147147

148148
# Center our camera on the player
149-
self.camera.center(self.player_sprite.position)
149+
self.camera.position = self.player_sprite.position
150150

151151
def on_key_press(self, key, modifiers):
152152
"""Called whenever a key is pressed."""

doc/tutorials/platform_tutorial/step_02.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Now we can draw the sprite by adding this to our ``on_draw`` function:
6868

6969
.. code-block::
7070
71-
self.player_sprite.draw()
71+
arcade.draw_sprite(self.player_sprite)
7272
7373
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.
7474

0 commit comments

Comments
 (0)