Working sound system and most enemies have a sound effect. This will make it easier to add sounds now.
This commit is contained in:
parent
83df9ff03b
commit
20cbc3a21c
12 changed files with 126 additions and 5 deletions
|
@ -13,6 +13,7 @@ namespace components {
|
|||
ENROLL_COMPONENT(Device, config, events);
|
||||
ENROLL_COMPONENT(Sprite, name);
|
||||
ENROLL_COMPONENT(Animation, scale, simple, frames, speed);
|
||||
ENROLL_COMPONENT(Sound, attack, death);
|
||||
|
||||
void configure_entity(const ComponentMap& component_map, DinkyECS::World& world, DinkyECS::Entity ent, json& data) {
|
||||
for (auto &i : data) {
|
||||
|
@ -35,6 +36,7 @@ namespace components {
|
|||
components::enroll<Device>(component_map);
|
||||
components::enroll<Sprite>(component_map);
|
||||
components::enroll<Animation>(component_map);
|
||||
components::enroll<Sound>(component_map);
|
||||
}
|
||||
|
||||
void Animation::play() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue