from pygame.sprite import Sprite import pygame.image import os from . import constants class Character(Sprite): @staticmethod def loadFrames(type): frames={} dirs=["up","down","left","right"] num_frames=3 for direction in dirs: frame_array=[0,0,0] i=0 while i2: self.frame=0 tile=self.map.tileAt(self.x,self.y) if not tile.clear: self.x=old_x self.y=old_y