fixed scoping
This commit is contained in:
parent
c78ddec973
commit
34fd025992
@ -1,5 +1,6 @@
|
||||
do
|
||||
local SoundCubeApi = {}
|
||||
local internal = {}
|
||||
|
||||
-- this table links the name of a trigger effect to its index
|
||||
local soundIndices = {
|
||||
@ -8,14 +9,14 @@ do
|
||||
["Dark Souls"] = 2
|
||||
}
|
||||
|
||||
function playTriggerEffect(index)
|
||||
function internal.playTriggerEffect(index)
|
||||
getObjectsWithTag("SoundCube")[1].AssetBundle.playTriggerEffect(index)
|
||||
end
|
||||
|
||||
-- plays the by name requested sound
|
||||
---@param soundName String Name of the sound to play
|
||||
SoundCubeApi.playSoundByName = function(soundName)
|
||||
playTriggerEffect(soundIndices[soundName])
|
||||
internal.playTriggerEffect(soundIndices[soundName])
|
||||
end
|
||||
|
||||
return SoundCubeApi
|
||||
|
Loading…
Reference in New Issue
Block a user