Started to implement turn based system from GameUtils
This commit is contained in:
4
game.py
4
game.py
@ -29,6 +29,8 @@ class Game(gameUtils.Game):
|
|||||||
# and should have an animation accompanying it.
|
# and should have an animation accompanying it.
|
||||||
# see Brosef for the animation.
|
# see Brosef for the animation.
|
||||||
|
|
||||||
|
self.turnHandler = gameUtils.RoundTable(1, self.pm)
|
||||||
|
|
||||||
#Sounds for the gun :3
|
#Sounds for the gun :3
|
||||||
self.playSound = pygame.mixer.Sound.play
|
self.playSound = pygame.mixer.Sound.play
|
||||||
self.gunBlank = pygame.mixer.Sound("./assets/gun-blank.mp3")
|
self.gunBlank = pygame.mixer.Sound("./assets/gun-blank.mp3")
|
||||||
@ -62,6 +64,8 @@ class Game(gameUtils.Game):
|
|||||||
def fire(self):#LETS GO GAMBLING
|
def fire(self):#LETS GO GAMBLING
|
||||||
if randint(1,6) == 6:
|
if randint(1,6) == 6:
|
||||||
self.playSound(self.gunShot)
|
self.playSound(self.gunShot)
|
||||||
|
self.turnHandler.playing[0].punish(self.shockScale)
|
||||||
|
self.turnHandler.next()
|
||||||
return 0.04
|
return 0.04
|
||||||
#remember to add shock
|
#remember to add shock
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user