Dec-14-2020, 09:05 AM
whenever i make a wait function after the door is opened it just freezes the game instead of just freezing the door.
def door_open(self): if self.flag == 'door_h': self.y -= 3 if abs(self.y - self.door_prev_pos) > TILE: self.door_open_trigger = False self.door_close_trigger = True elif self.flag == 'door_v': self.x -= 3 if abs(self.x - self.door_prev_pos) > TILE: self.door_open_trigger = False pygame.time.wait(2000) self.door_close_trigger = True