Removed spinning variable and any checks for it as they were actually completely fucking useless
This commit is contained in:
@ -45,7 +45,6 @@ class Game:
|
|||||||
self.shockScale = 0 #controls shock level sent to PDO (on a scale of 0 to 1)
|
self.shockScale = 0 #controls shock level sent to PDO (on a scale of 0 to 1)
|
||||||
#gun variables
|
#gun variables
|
||||||
self.startSpin = False
|
self.startSpin = False
|
||||||
self.spinning = False
|
|
||||||
self.spinInc = 0
|
self.spinInc = 0
|
||||||
|
|
||||||
#render variables
|
#render variables
|
||||||
@ -88,14 +87,12 @@ class Game:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
#gun code WOO
|
#gun code WOO
|
||||||
if self.startSpin == True or self.spinning == True:#check if space was pressed or if the gun is already spinning
|
if self.startSpin == True:#check if space was pressed or if the gun is already spinning
|
||||||
self.spinning = True #keep the gun spinning
|
|
||||||
if self.spinInc == 0:
|
if self.spinInc == 0:
|
||||||
self.playSound(self.gunSpin)
|
self.playSound(self.gunSpin)
|
||||||
self.spinInc += 1 #next gun frame
|
self.spinInc += 1 #next gun frame
|
||||||
if self.spinInc == len(self.gun): #if we've reached the end
|
if self.spinInc == len(self.gun): #if we've reached the end
|
||||||
self.spinInc = 0 #reset frame count
|
self.spinInc = 0 #reset frame count
|
||||||
self.spinning = False #stop spinning
|
|
||||||
self.startSpin = False #what did i say bitch? stop spinning
|
self.startSpin = False #what did i say bitch? stop spinning
|
||||||
self.shockScale += self.fire() #check if the user gets shot
|
self.shockScale += self.fire() #check if the user gets shot
|
||||||
self.shockScale = min(self.shockScale, 1) #keeps shockScale in bounds
|
self.shockScale = min(self.shockScale, 1) #keeps shockScale in bounds
|
||||||
@ -113,9 +110,6 @@ class Game:
|
|||||||
# and how the base game should draw that.
|
# and how the base game should draw that.
|
||||||
# - Brosef
|
# - Brosef
|
||||||
|
|
||||||
# TODO:
|
|
||||||
# Actually scale the gun with self.size, and centre it
|
|
||||||
|
|
||||||
pygame.display.flip()
|
pygame.display.flip()
|
||||||
|
|
||||||
self.clock.tick(60)
|
self.clock.tick(60)
|
||||||
|
|||||||
Reference in New Issue
Block a user