From db76ab800cbc4995b5d0eca7c7437e1270cc9e83 Mon Sep 17 00:00:00 2001 From: TRS_MML Date: Sun, 15 Jun 2025 18:03:10 +0100 Subject: [PATCH] Fixed the gun animator so that it is no longer hard coded, also removed a test print statement --- __main__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/__main__.py b/__main__.py index 70146b4..83ee4a6 100644 --- a/__main__.py +++ b/__main__.py @@ -17,8 +17,6 @@ yOffset = 0 pygame.init() gun = pygame.image.load_animation("gun.webp") -print(gun[0]) - GunFlash = pygame.image.load("images/muzzleflash.png") #Sounds for the gun :3 @@ -58,7 +56,7 @@ while running: if spinInc == 0: PlaySound(GunSpin) spinInc += 1 #next gun frame - if spinInc == 61: #if we've reached the end + if spinInc == len(gun): #if we've reached the end spinInc = 0 #reset frame count spinning = False #stop spinning startSpin = False #what did i say bitch? stop spinning