modules/menusystem: add a function to get sound from scene assetmanager

This commit is contained in:
Kazhnuz 2019-04-20 17:54:22 +02:00
parent faa12d4ff7
commit 4c1acb0afa

View file

@ -256,6 +256,10 @@ function Menu:resetSound()
self.sound.asset = nil self.sound.asset = nil
end end
function Menu:setSoundFromSceneAssets(name)
self:setSound(self.menusystem.scene.assets.sfx[name])
end
function Menu:setSound(soundasset) function Menu:setSound(soundasset)
self.sound.active = true self.sound.active = true
self.sound.asset = soundasset self.sound.asset = soundasset