Is it possible in pygame to have "for event in pygame.event.get():" multiple times in the same loop, or do you have to only use it once? I was learning pygame, and I decided to define 2 functions that both check for events, but when one was called, the other one didn't work. Please keep in mind that I am a noob. This obviously isn't the actual code, but it's the jist of what I'm doing.
import pygame
class someclass:
def __init__(self):
some declaration
def somefunction(self):
for event in pygame.event.get():
if event.type == someevent:
some code
def mainloop(self):
someinstance = somesubclass()
while True:
someinstance.somefunction2()
self.somefunction()
class somesubclass:
def __init__(self):
some declaration
def somefunction2(self):
for event in pygame.event.get():
if event.type == someevent
somecode
maininstance = someclass()
maininstance.mainloop()
somefunction doesn't execute