This commit is contained in:
2025-06-16 20:57:14 +01:00

View File

@ -4,6 +4,8 @@ from random import randint
#import NoPELib
#import PDOLib
#Oh god here we go. I'm gonna screw up this entire thing
class Game:
def __init__(self, surface, size):
"""
@ -18,17 +20,30 @@ class Game:
self.surface = surface
self.size = size
self.clock = pygame.time.Clock()
# TODO: Add a random delay between the spin and fire
# TODO: Utiles the following new sounds:
# gun-load: Should be played at the beginning of the game,
# and should have an animation accompanying it.
# see Brosef for the animation.
# gun-cylinder-stop: Plays directly after the load
# animation is complete.
# gun-spin/blank/shot are all used in their original ways.
#Sounds for the gun :3
self.playSound = pygame.mixer.Sound.play
self.gunBlank = pygame.mixer.Sound("sfx/gun-blank.mp3")
self.gunShot = pygame.mixer.Sound("sfx/gun-shot.mp3")
self.gunSpin = pygame.mixer.Sound("sfx/gun-spin.mp3")
self.gunLoad = pygame.mixer.Sound("sfx/gun-load.mp3")
self.gunCyclinder = pygame.mixer.Sound("sfx/gun-cylinder-stop")
self.gun = pygame.image.load_animation("gun.webp")
self.gunFlash = pygame.image.load("images/muzzleflash.png")
self.shockScale = 0 #controls shock level sent to PDO (on a scale of 0 to 1)
#gun varialbes
#gun variables
self.startSpin = False
self.spinning = False
self.spinInc = 0