Compare commits
3 Commits
655edc25ee
...
26b0363764
| Author | SHA1 | Date | |
|---|---|---|---|
| 26b0363764 | |||
| e2ed74b92a | |||
| 6023b9a2b5 |
10
game.py
10
game.py
@ -21,15 +21,12 @@ class Game(gameUtils.Game):
|
|||||||
|
|
||||||
# TODO: Utilise self.pm (the player manager)
|
# TODO: Utilise self.pm (the player manager)
|
||||||
# TODO: Add background music
|
# TODO: Add background music
|
||||||
|
# TODO: Add muzzle flash
|
||||||
|
|
||||||
# TODO: Utilise the following new sounds:
|
# TODO: Utilise the following new sounds:
|
||||||
# gun-load: Should be played at the beginning of the game,
|
# gun-load: Should be played at the beginning of the 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.
|
||||||
# gun-spin is used in it's original way.
|
|
||||||
# gun-cylinder-stop: Plays directly after the gun
|
|
||||||
# stops spinning.
|
|
||||||
# blank/shot are played after a random delay.
|
|
||||||
|
|
||||||
#Sounds for the gun :3
|
#Sounds for the gun :3
|
||||||
self.playSound = pygame.mixer.Sound.play
|
self.playSound = pygame.mixer.Sound.play
|
||||||
@ -52,6 +49,9 @@ class Game(gameUtils.Game):
|
|||||||
self.gunh=self.gun.size[1] #calculates height of gun anim
|
self.gunh=self.gun.size[1] #calculates height of gun anim
|
||||||
#NOTE: Brosef, istg you better not make the gun webm
|
#NOTE: Brosef, istg you better not make the gun webm
|
||||||
# change sizes mid file, or so help me
|
# change sizes mid file, or so help me
|
||||||
|
#
|
||||||
|
# :3
|
||||||
|
# - Brosef
|
||||||
|
|
||||||
self.screenMidx = self.size[0]/2 #calculates horizontal midpoint of screen
|
self.screenMidx = self.size[0]/2 #calculates horizontal midpoint of screen
|
||||||
self.screenMidy = self.size[1]/2 #calculates verticle midpoint of screen
|
self.screenMidy = self.size[1]/2 #calculates verticle midpoint of screen
|
||||||
@ -89,7 +89,7 @@ class Game(gameUtils.Game):
|
|||||||
self.playSound(self.gunSpin)
|
self.playSound(self.gunSpin)
|
||||||
elif event.type == gameUtils.AnimFinish:
|
elif event.type == gameUtils.AnimFinish:
|
||||||
if event.objectID == self.gun.objectID and event.animationID == 'spin':
|
if event.objectID == self.gun.objectID and event.animationID == 'spin':
|
||||||
self.timeout("FireDelay",randint(0,2000)/1000)
|
self.timeout("FireDelay",randint(750,2000)/1000)
|
||||||
self.playSound(self.gunCyclinderStop)
|
self.playSound(self.gunCyclinderStop)
|
||||||
|
|
||||||
elif event.type == gameUtils.Timeout:
|
elif event.type == gameUtils.Timeout:
|
||||||
|
|||||||
Reference in New Issue
Block a user