Removed redundant variables
This commit is contained in:
10
game.py
10
game.py
@ -19,8 +19,6 @@ class Game(gameUtils.Game):
|
||||
# Don't remove this. It does important things. :3
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.clock = pygame.time.Clock()
|
||||
|
||||
# TODO: Add a random delay between the spin and fire
|
||||
|
||||
# TODO: Utiles the following new sounds:
|
||||
@ -46,9 +44,6 @@ class Game(gameUtils.Game):
|
||||
self.gun.addAnimation(gameUtils.AnimationHandler('spin', './assets/gun-spin.webp', 60))
|
||||
|
||||
self.shockScale = 0 #controls shock level sent to PDO (on a scale of 0 to 1)
|
||||
#gun variables
|
||||
self.startSpin = False
|
||||
self.spinInc = 0
|
||||
|
||||
#render variables
|
||||
self.gunw=self.gun.size[0] #calculates width of gun anim
|
||||
@ -61,9 +56,6 @@ class Game(gameUtils.Game):
|
||||
|
||||
self.gunScale = min(self.size[1]/self.gunh,self.size[0]/self.gunw) #calculates how to scale the gun so that it stays on the screen
|
||||
|
||||
self.gunMidx = self.screenMidx-(self.gunw*self.gunScale/2) #gun midpoint on the x axis
|
||||
self.gunMidy = self.screenMidy-(self.gunh*self.gunScale/2) #gun midpoint on the y axis
|
||||
|
||||
def fire(self):#LETS GO GAMBLING
|
||||
if randint(1,6) == 6:
|
||||
self.playSound(self.gunShot)
|
||||
@ -109,7 +101,7 @@ class Game(gameUtils.Game):
|
||||
|
||||
#screen code
|
||||
self.surf.fill("black")
|
||||
self.surf.blit(gameUtils.utils.centre(pygame.transform.scale_by(self.gun.getFrame(), self.gunScale), self.size))
|
||||
self.surf.blit(gameUtils.centre(pygame.transform.scale_by(self.gun.getFrame(), self.gunScale), self.size))
|
||||
|
||||
def close(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user