So there's this game I'm making and I have the play button as an actor, how do I make it so that when I click it, it disappears? Using pgzero on windows.
PS: I have everything down but the disappearing part.
playbox = Actor("playbox")
createbox = Actor("createbox")
customizebox = Actor("customizebox")
choose_quiz = Actor("choosequiz")
mainboxes = [playbox, createbox, customizebox]
playbox.move_ip(200, 250)
createbox.move_ip(200,360)
customizebox.move_ip(200,470)
choose_quiz.move_ip(0, 0)
def draw():
playbox.draw()
createbox.draw()
customizebox.draw()
def on_mouse_down(pos):
#i need 'playbox' to dissapear when I click it
if playbox.collidepoint(pos):
print("working")
screen.clear()
screen.blit("choosequiz", (0, 0))