Fixed the gun animator so that it is no longer hard coded, also removed a test print statement
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user