}
@ReceiveEvent
public void onDamaged(OnDamagedEvent event, EntityRef entity, CharacterSoundComponent characterSounds) {
if (characterSounds.lastSoundTime + MIN_TIME < time.getGameTimeInMs()) {
DamageSoundComponent damageSounds = event.getType().getComponent(DamageSoundComponent.class);
StaticSound sound = null;
if (damageSounds != null && !damageSounds.sounds.isEmpty()) {
sound = random.nextItem(damageSounds.sounds);
} else if (!characterSounds.damageSounds.isEmpty()) {
sound = random.nextItem(characterSounds.damageSounds);