update Assets container - template-based now

This commit is contained in:
MihailRis
2024-06-22 22:30:14 +03:00
parent 848d121099
commit d54b6b2e58
20 changed files with 68 additions and 143 deletions
+3 -3
View File
@@ -30,7 +30,7 @@ LevelFrontend::LevelFrontend(LevelController* controller, Assets* assets)
}
if (type == BlockInteraction::step) {
auto sound = assets->getSound(material->stepsSound);
auto sound = assets->get<audio::Sound>(material->stepsSound);
audio::play(
sound,
glm::vec3(),
@@ -45,10 +45,10 @@ LevelFrontend::LevelFrontend(LevelController* controller, Assets* assets)
audio::Sound* sound = nullptr;
switch (type) {
case BlockInteraction::placing:
sound = assets->getSound(material->placeSound);
sound = assets->get<audio::Sound>(material->placeSound);
break;
case BlockInteraction::destruction:
sound = assets->getSound(material->breakSound);
sound = assets->get<audio::Sound>(material->breakSound);
break;
case BlockInteraction::step:
break;