Skip to content
Permalink
Browse files

added audio for fight club

  • Loading branch information...
adangert committed May 31, 2018
1 parent 7761d22 commit 62a271071fd126f6c8ba46acc10e9997c0cd0bc0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -242,6 +242,8 @@ def __init__(self, moves, command_queue, ns, music):
self.explosion = Audio('audio/Joust/sounds/Explosion34.wav')
self.revive = Audio('audio/Commander/sounds/revive.wav')



end = False
self.audio = music
#self.change_time = self.get_change_time(speed_up = True)
@@ -387,7 +389,9 @@ def alive_move_count(self):
#more than one tied winner, have them face off
def face_off(self):
#print(self.winning_moves)
os.popen('espeak -ven -p 70 -a 200 "Tie game..... Face off"')
#os.popen('espeak -ven -p 70 -a 200 "Tie game..... Face off"')

Audio('audio/Fight_Club/tie_game.wav').start_effect()
for move in self.move_serials:
self.dead_moves[move].value = 0
for move in self.winning_moves:
@@ -433,9 +437,11 @@ def check_end_game(self):
if self.round_counter >= self.round_num:
self.check_winner()
if self.round_counter == self.round_num - 5:
os.popen('espeak -ven -p 70 -a 200 "5 rounds remain"')
Audio('audio/Fight_Club/5_rounds.wav').start_effect()
#os.popen('espeak -ven -p 70 -a 200 "5 rounds remain"')
if self.round_counter == self.round_num - 1:
os.popen('espeak -ven -p 70 -a 200 "last round"')
Audio('audio/Fight_Club/last_round.wav').start_effect()
#os.popen('espeak -ven -p 70 -a 200 "last round"')


def stop_tracking_moves(self):
@@ -451,7 +457,8 @@ def end_game(self):
h_value = 0
for move in self.move_serials:
self.dead_moves[move].value = 0
os.popen('espeak -ven -p 70 -a 200 "winner"')
Audio('audio/Fight_Club/game_over.wav').start_effect()
#os.popen('espeak -ven -p 70 -a 200 "winner"')

while (time.time() < end_time):
time.sleep(0.01)
@@ -551,11 +558,14 @@ def reset_round_timer(self):
self.current_winner = self.chosen_defender
saying = random.randint(0,2)
if saying == 0:
os.popen('espeak -ven -p 70 -a 200 "Defender has taken the lead"')
Audio('audio/Fight_Club/defender_lead.wav').start_effect()
#os.popen('espeak -ven -p 70 -a 200 "Defender has taken the lead"')
elif saying == 1:
os.popen('espeak -ven -p 70 -a 200 "Defender is now winning"')
Audio('audio/Fight_Club/defender_winning.wav').start_effect()
#os.popen('espeak -ven -p 70 -a 200 "Defender is now winning"')
elif saying == 2:
os.popen('espeak -ven -p 70 -a 200 "Defender has the high score"')
Audio('audio/Fight_Club/Defender_high_score.wav').start_effect()
#os.popen('espeak -ven -p 70 -a 200 "Defender has the high score"')
self.check_end_game()


@@ -365,9 +365,9 @@ def game_mode_announcement(self):
if self.game_mode == common.Games.Random:
Audio('audio/Menu/menu Random.wav').start_effect()
if self.game_mode == common.Games.FightClub:
os.popen('espeak -ven -p 70 -a 200 "Fight Club"')
Audio('audio/Menu/menu FightClub.wav').start_effect()
if self.game_mode == common.Games.NonStop:
os.popen('espeak -ven -p 70 -a 200 "Non stop joust"')
Audio('audio/Menu/menu NonStopJoust.wav').start_effect()

def check_change_mode(self):
change_mode = False

0 comments on commit 62a2710

Please sign in to comment.
You can’t perform that action at this time.