Python Arcade library p08 - sprite animation with AnimatedWalkingSprite

preview_player
Показать описание
In this video we are going to create an animation, using the AnimatedWalkingSprite class.

Рекомендации по теме
Комментарии
Автор

The walk_right_textures etc can be treated like lists without having to explicitly define it as an empty list, so you can call the `.extend` method on it to pass in the textures!
And I get that for beginners this may be more straight forward, but I think using a list comp or a for loop would be better for loading the multiple textures...

Example:

base =
for i in range(8)])
self.player.walk_left_textures.extend([arcade.load_texture(base.format(i), mirrored=True) for i in range(8)])

along with using self.width // 2 and self.height // 2 to set the player in the middle, instead of using the hard numbers

Really well done, much appreciated

zeldaplayergl
Автор

Hello! I had a AttributeError: 'NoneType' object has no attribute 'append' under a version:3.7 (32 bit). Please, help me!

heresytech