Ignore:
Timestamp:
09/07/13 22:43:59 (8 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Rebase:
35316663623936383234333965383338613739373430323738326364393366306635666439666234
Message:

Bullet sounds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/game_object.py

    r610 r612  
    638638class Bullet(GameObject):
    639639    def __init__(self, space, position, impulse, damage, bullet_type,
    640                  source_collision_type):
     640                 source_collision_type, bullet_sound=None):
    641641        body = make_body(1, pymunk.inf, position)
    642642        body.angle = impulse.angle
     
    654654        )
    655655        self.physicser.apply_impulse(impulse)
     656        if bullet_sound is not None:
     657            sound.play_sound(bullet_sound, 0.3)
    656658
    657659    def update(self, dt):
Note: See TracChangeset for help on using the changeset viewer.