modules/menusystem: add a function to get sound from scene assetmanager
This commit is contained in:
parent
faa12d4ff7
commit
4c1acb0afa
1 changed files with 4 additions and 0 deletions
|
@ -256,6 +256,10 @@ function Menu:resetSound()
|
|||
self.sound.asset = nil
|
||||
end
|
||||
|
||||
function Menu:setSoundFromSceneAssets(name)
|
||||
self:setSound(self.menusystem.scene.assets.sfx[name])
|
||||
end
|
||||
|
||||
function Menu:setSound(soundasset)
|
||||
self.sound.active = true
|
||||
self.sound.asset = soundasset
|
||||
|
|
Loading…
Reference in a new issue