But when I try to animate it, it still shows the first image. Any help with this is much appreciated.
class Plat_normal():
x = 0
y = 0
imgIndex = 0
sheet = pygame.image.load("plat_normal.png").convert_alpha()
rect = pygame.Rect((imgIndex,0),(32,32))
img = pygame.Surface(rect.size).convert()
img.blit(sheet,(0,0),rect)
def draw(self,scrn):
scrn.screen.blit(self.img, (self.x - camera.x, self.y - camera.y))
def animate(self):
self.imgIndex += 32
self.rect = pygame.Rect((self.imgIndex,0),(32,32))
self.img = pygame.Surface(self.rect.size).convert()
self.img.blit(self.sheet,(0,0),self.rect)






