some sounds
This commit is contained in:
2
Sound.py
2
Sound.py
@@ -5,5 +5,5 @@ class Sound:
|
|||||||
self.name = "Sound " + str(id)
|
self.name = "Sound " + str(id)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def play(self, name):
|
def play(self):
|
||||||
networking.playSound(self.name)
|
networking.playSound(self.name)
|
||||||
@@ -19,11 +19,11 @@ class SpinnerEvent(Event):
|
|||||||
def scorePoints(self):
|
def scorePoints(self):
|
||||||
playerState = self.gameState.currentPlayer
|
playerState = self.gameState.currentPlayer
|
||||||
timePassed = time() - self.activationTime
|
timePassed = time() - self.activationTime
|
||||||
if 1 <= timePassed < 1.5:
|
if 0.5 <= timePassed < 1:
|
||||||
playerState.addPoints(100000)
|
playerState.addPoints(100000)
|
||||||
elif 1.5 <= timePassed < 2:
|
elif 1 <= timePassed < 1.5:
|
||||||
playerState.addPoints(150000)
|
playerState.addPoints(150000)
|
||||||
elif 2 <= timePassed < 5:
|
elif 1.5 <= timePassed < 3:
|
||||||
playerState.addPoints(200000)
|
playerState.addPoints(200000)
|
||||||
elif timePassed >= 5:
|
elif timePassed >= 3:
|
||||||
playerState.addPoints(500000)
|
playerState.addPoints(500000)
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
from Target import Target
|
from Target import Target
|
||||||
|
from Sound import Sound
|
||||||
|
|
||||||
class LeftPopTarget(Target):
|
class LeftPopTarget(Target):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(5000, "Left Pop")
|
super().__init__(5000, "Left Pop")
|
||||||
|
|
||||||
def hit(self):
|
def hit(self):
|
||||||
|
Sound(3).play()
|
||||||
super().hit()
|
super().hit()
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
from Target import Target
|
from Target import Target
|
||||||
|
from Sound import Sound
|
||||||
|
|
||||||
class RightPopTarget(Target):
|
class RightPopTarget(Target):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(5000, 'Right Pop')
|
super().__init__(5000, 'Right Pop')
|
||||||
|
|
||||||
def hit(self):
|
def hit(self):
|
||||||
|
Sound(3).play()
|
||||||
super().hit()
|
super().hit()
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
from Target import Target
|
from Target import Target
|
||||||
|
from Sound import Sound
|
||||||
|
|
||||||
# A standup target. When lit, it scores the Orange Special (operator
|
# A standup target. When lit, it scores the Orange Special (operator
|
||||||
# adjustable) for Nothing, Extra Ball, Replay, Super Bonus, or 300,000
|
# adjustable) for Nothing, Extra Ball, Replay, Super Bonus, or 300,000
|
||||||
@@ -9,4 +9,5 @@ class FixedSpecialOrangeTarget(Target):
|
|||||||
super().__init__(100000, "Special Orange")
|
super().__init__(100000, "Special Orange")
|
||||||
|
|
||||||
def hit(self):
|
def hit(self):
|
||||||
|
Sound(5).play()
|
||||||
super().hit()
|
super().hit()
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
from Target import Target
|
from Target import Target
|
||||||
|
from Sound import Sound
|
||||||
# A standup target. When lit, it scores the Red Special (operator
|
# A standup target. When lit, it scores the Red Special (operator
|
||||||
# adjustable) for Nothing, Extra Ball, Replay, Super Bonus, or 1,000,000
|
# adjustable) for Nothing, Extra Ball, Replay, Super Bonus, or 1,000,000
|
||||||
# points. Scores 10,000 points when not lit.
|
# points. Scores 10,000 points when not lit.
|
||||||
@@ -8,4 +8,5 @@ class FixedSpecialRedTarget(Target):
|
|||||||
super().__init__(10000, "Special Red")
|
super().__init__(10000, "Special Red")
|
||||||
|
|
||||||
def hit(self):
|
def hit(self):
|
||||||
|
Sound(4).play()
|
||||||
super().hit()
|
super().hit()
|
||||||
Reference in New Issue
Block a user