so i am currently working on a FNaF styled game i and want to animate 2 images like a gif while i can move the image with my mouse. i have figured out how to move the image already but the animation is a different story. help would be apreciated. heres my code
import pygame
from sys import exit
import time
pygame.init()
FPS = 60
clock = pygame.time.Clock()
#screen = pygame.display.set_mode((768,128*3))
screen = pygame.display.set_mode((1536,768))
pygame.display.set_caption('FNamH')
office_frame_1 = pygame.image.load('fnamh_office.png')
office_frame_2 = pygame.image.load('fnamh_office_2.png')
#office = pygame.transform.scale(office_frame_1,(1440,128*3.3))
#office_2 = pygame.transform.scale(office_frame_2,(1440,128*3.3))
office = pygame.transform.scale(office_frame_1,(2880,840))
office_2 = pygame.transform.scale(office_frame_1,(2880,840))
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()
mx, my = pygame.mouse.get_pos()
screen.blit(office,(mx*-1,my*-0.1))
screen.blit(office_2,(mx*-1,my*-0.1))
pygame.display.update()