Changeset 532:eec2cf912e03


Ignore:
Timestamp:
04/09/11 22:19:20 (12 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Rebase:
64346339386236336561396564336330363065393633356161396130613735356639326231386664
Message:

Add tearing rice sound. Only smash breakables once.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/sprites/items.py

    r529 r532  
    1313    whole_image_file = None
    1414    broken_image_file = None
    15     breaking_sound = (None, None)
     15    breaking_sound = None, None
    1616
    1717    collides_with = set([PC_LAYER, PROJECTILE_LAYER])
     
    3030
    3131    def smash(self):
    32         self._me.broken = True
    33         self.broken = True
    34         self.setup_image_data(self._starting_tile_pos)
    35         if self.breaking_sound[0] is not None:
    36             sound.play_sound(self.breaking_sound[0])
     32        if not self._me.broken:
     33            self._me.broken = True
     34            self.broken = True
     35            self.setup_image_data(self._starting_tile_pos)
     36            if self.breaking_sound[0] is not None:
     37                sound.play_sound(self.breaking_sound[0])
    3738
    3839    def damage(self, damage):
     
    221222    whole_image_file = 'props/vase-whole.png'
    222223    broken_image_file = 'props/vase-broken.png'
    223     breaking_sound = ('sounds/vase breaking.ogg', 0.1)
     224    breaking_sound = 'sounds/vase breaking.ogg', 0.1
    224225
    225226
     
    250251    whole_image_file = 'props/rice-whole.png'
    251252    broken_image_file = 'props/rice-broken.png'
     253    breaking_sound = 'sounds/tearing-rice bag.ogg', 0.2
    252254
    253255
Note: See TracChangeset for help on using the changeset viewer.