I am trying to make a kind of loading-screen thing. I want every 5 seconds to change the background picture. I tried using pygame.time.wait()but it does not work.
Here is my code:
import pygame
pygame.init()
screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
bomb_1 = pygame.image.load("bombs/bomb-1.png")
bomb_2 = pygame.image.load("bombs/bomb-2.png")
def loading():
screen.blit(bomb_1, (0, 0))
# I want to wait here
screen.blit(bomb_2, (0, 0))