Mercurial > touhou
comparison pytouhou/games/eosd.py @ 379:e0e284fcb288
Make a sound when an enemy is hit.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 30 Aug 2012 11:34:56 +0200 |
parents | a5595de3fe7e |
children | 690b5faaa0e6 |
comparison
equal
deleted
inserted
replaced
378:11d895b6c0dc | 379:e0e284fcb288 |
---|---|
192 timeout_label = self.labels['timeout'] | 192 timeout_label = self.labels['timeout'] |
193 if timeout >= 20: | 193 if timeout >= 20: |
194 timeout_label.set_color('blue') | 194 timeout_label.set_color('blue') |
195 elif timeout >= 10: | 195 elif timeout >= 10: |
196 timeout_label.set_color('darkblue') | 196 timeout_label.set_color('darkblue') |
197 elif timeout >= 5: | |
198 timeout_label.set_color('purple') | |
199 else: | 197 else: |
200 timeout_label.set_color('red') | 198 if timeout >= 5: |
199 timeout_label.set_color('purple') | |
200 else: | |
201 timeout_label.set_color('red') | |
202 if (boss.timeout - boss.frame) % 60 == 0 and boss.timeout != 0: | |
203 self.game.sfx_player.play('timeout.wav', volume=1.) | |
201 timeout_label.set_text('%02d' % (timeout if timeout >= 0 else 0)) | 204 timeout_label.set_text('%02d' % (timeout if timeout >= 0 else 0)) |
202 timeout_label.changed = True | 205 timeout_label.changed = True |
203 | 206 |
204 | 207 |
205 | 208 |