name = "{:04d}".format(1)
0001
str(name) + ".png"
0001.png
-------------------------------------------------------------------------------------------------------
#python lists animation_north = [] animation_south = [] animation_east = [] animation_west = []
#LOAD 20 IMAGES FROM EACH FOLDER. FILE NAME FORMAT 0001.png for i in range(1,21): name = "{:04d}".format(i) #BLENDER NAME FIX path = "assets/north/"+ str(name) +".png" animation_north.append(pygame.image.load(path).convert_alpha()) path = "assets/south/" + str(name) +".png" animation_south.append(pygame.image.load(path).convert_alpha()) path = "assets/east/" + str(name) +".png" animation_east.append(pygame.image.load(path).convert_alpha()) path = "assets/west/" + str(name) +".png" animation_west.append(pygame.image.load(path).convert_alpha())
-------------------------------------------------------------------------------------------------------
ANIMATION
self.image_list = animation_south self.image = self.image_list[self.image_index]
CHANGE ANIMATION FROM SOUTH TO NORTH
self.image_list = animation_north
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.