Changeset 612:d9e7009bec9f


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

Bullet sounds.

Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • data/sounds/SOURCES.txt

    r588 r612  
    2222Notes:
    2323    Ogg generated using 'oggenc robotstep2.wav'
     24
     25
     26mouth_pop_2a.ogg
     27----------------
     28
     29URL:
     30    http://archive.org/download/Berklee44v5/Berklee44v5.zip
     31Source:
     32    http://archive.org/details/Berklee44v5
     33License:
     34    http://creativecommons.org/licenses/by/3.0
     35Notes:
     36    Ogg generated using 'oggenc -q -1 mouth_pop_2a.wav'
     37
     38
     39vocoder2_short.ogg
     40------------------
     41
     42URL:
     43    http://archive.org/download/Berklee44v5/Berklee44v5.zip
     44Source:
     45    http://archive.org/details/Berklee44v5
     46License:
     47    http://creativecommons.org/licenses/by/3.0
     48Notes:
     49    Ogg generated using 'oggenc -q -1 vocoder2_short.ogg'
  • nagslang/enemies.py

    r603 r612  
    122122                result.add += (Bullet(
    123123                    self.get_space(), self.physicser.position, vec, damage,
    124                     type_, COLLISION_TYPE_ENEMY),)
     124                    type_, COLLISION_TYPE_ENEMY,
     125                    "mouth_pop_2a.ogg"),)
    125126
    126127    def greedy_move(self, target):
  • 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):
  • nagslang/protagonist.py

    r538 r612  
    312312        return Result(add=(Bullet(self.get_space(), self.physicser.position,
    313313                                  vec, BULLET_DAMAGE, 'bullet',
    314                                   COLLISION_TYPE_PLAYER),))
     314                                  COLLISION_TYPE_PLAYER,
     315                                  "vocoder2_short.ogg"),))
    315316
    316317    def claw(self):
Note: See TracChangeset for help on using the changeset viewer.