Mercurial > fife-parpg
diff demos/shooter/scripts/ships/player.py @ 485:d365eb58f3d6
SoundClip can now fire a callback after a sound has completed being played (i.e. the duration of the sound has passed by). I have added an example of this with the scene music. [t:346]
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 30 Apr 2010 15:37:33 +0000 |
parents | ab28994820dd |
children | c4168eb47a44 |
line wrap: on
line diff
--- a/demos/shooter/scripts/ships/player.py Fri Apr 30 15:33:27 2010 +0000 +++ b/demos/shooter/scripts/ships/player.py Fri Apr 30 15:37:33 2010 +0000 @@ -57,6 +57,7 @@ self._lives = 3 self.init() + def init(self): self._hitpoints = 2 @@ -111,6 +112,7 @@ def destroy(self): if not self._invulnerable and not self._dead: self._instance.act('explode', self._instance.getFacingLocation()) + self._scene.soundmanager.playClip(self._explodclip) self._dead = True self._invulnerable = True self._lives -= 1