diff options
Diffstat (limited to 'src/crepe/system/AudioSystem.cpp')
-rw-r--r-- | src/crepe/system/AudioSystem.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/crepe/system/AudioSystem.cpp b/src/crepe/system/AudioSystem.cpp index f90132a..97cf966 100644 --- a/src/crepe/system/AudioSystem.cpp +++ b/src/crepe/system/AudioSystem.cpp @@ -1,20 +1,23 @@ #include "AudioSystem.h" -#include "ComponentManager.h" #include "../api/AudioSource.h" +#include "../manager/ComponentManager.h" +#include "../manager/ResourceManager.h" +#include "../types.h" using namespace crepe; using namespace std; void AudioSystem::update() { - ComponentManager & mgr = this->component_manager; - vector<reference_wrapper<AudioSource>> components = mgr.get_components_by_type<AudioSource>(); + ComponentManager & component_manager = this->mediator.component_manager; + ResourceManager & resource_manager = this->mediator.resource_manager; + RefVector<AudioSource> components = component_manager.get_components_by_type<AudioSource>(); for (auto component_ref : components) { AudioSource & component = component_ref.get(); if (!component.active) continue; - Sound & sound = this->resource_manager.get<Sound>(component.source); + Sound & sound = resource_manager.get<Sound>(component.source); // TODO: lots of state diffing } } |