I want a certain function callable on a class. Something similar to:
class foo():
def __init__(self):
self.img = pygame.Surface((20, 20))
def magicfunction(self):
return self.img
bar = foo()
screen = pygame.display.set_mode((200, 200))
screen.blit(bar)
Which magic-function do I have to use?