Add sounds
This commit is contained in:
@@ -87,7 +87,8 @@ i32 harvestEvent(ecs_entity_t entity, HarvestEvent event) {
|
||||
.easeStart = 1.0f
|
||||
});
|
||||
SoundState *sounds = ecs_singleton_get_mut(ECS, SoundState);
|
||||
soundsPlay(sounds, SOUND_WOOD_PUNCH);
|
||||
Vector2 center = entityGetCenter(*ecs_get(ECS, entity, Position), *ecs_get(ECS, entity, HitBox));
|
||||
soundsPosPlay(sounds, center, getRandomSoundType(SOUNDS_WOOD_PUNCH_1, SOUNDS_WOOD_PUNCH_5));
|
||||
|
||||
Resource *res = ecs_get_mut(ECS, entity, Resource);
|
||||
BZ_ASSERT(res->type == event.type);
|
||||
|
||||
Reference in New Issue
Block a user