AttributeError: ‘ImageSheet’ object has no attribute ‘update’

import tsk
import pygame
pygame.init()

window = pygame.display.set_mode([1018,572])
background = tsk.Sprite("AirCity.jpg",0,0)
fire = tsk.ImageSheet("FlameDanceSheet.png",1,10)
c = pygame.time.Clock()

drawing = True
while drawing:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            drawing = False
        if event.type == pygame.K_SPACE:          
            fire.image_animation_rate = 30
        if event.type != pygame.K_SPACE:
            fire.image_animation_rate = 0
    #Error of the line under this comment
    fire.update(c.get_time())
    window.fill((0,0,0))
    background.draw()
    pygame.display.flip()
    c.tick(30)

The message I got:

Traceback (most recent call last): File "CYO5_2.py", line 20, in fire.update(c.get_time())
AttributeError: 'ImageSheet' object has no attribute 'update'



Read more here: https://stackoverflow.com/questions/67395580/attributeerror-imagesheet-object-has-no-attribute-update

Content Attribution

This content was originally published by thankyoustack at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: