file name format: 0001.png
name = "{:04d}".format(1)
0001
str(name) + ".png"
#python lists keeper_animation_north = [] keeper_animation_south = [] keeper_animation_east = [] keeper_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/keeper/north/"+ str(name) +".png" keeper_animation_north.append(pygame.image.load(path).convert_alpha()) path = "assets/keeper/south/" + str(name) +".png" keeper_animation_south.append(pygame.image.load(path).convert_alpha()) path = "assets/keeper/east/" + str(name) +".png" keeper_animation_east.append(pygame.image.load(path).convert_alpha()) path = "assets/keeper/west/" + str(name) +".png" keeper_animation_west.append(pygame.image.load(path).convert_alpha())
ANIMATION
self.image_list = keeper_animation_south self.image = self.image_list[self.image_index]
CHANGE ANIMATION
self.image_list = keeper_animation_north
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.