Say I have a Button sprite class like
class Button(pygame.sprite.Sprite):
def __init__(self, callback, ...):
self.callback = callback
Now, callback is a function, but takes say an array and does something with it. Once I click the button, the array is changed, but now I want to apply the same button but on the new array?
Note that the button works the first iteration but now I want the function to be updated with the new array.