25 lines
663 B
Plaintext
25 lines
663 B
Plaintext
do
|
|
local SoundCubeApi = {}
|
|
local guidReferenceApi = require("core/GUIDReferenceApi")
|
|
|
|
-- this table links the name of a trigger effect to its index
|
|
local soundIndices = {
|
|
["Vacuum"] = 0,
|
|
["Deep Bell"] = 1,
|
|
["Dark Souls"] = 2
|
|
}
|
|
|
|
local function playTriggerEffect(index)
|
|
local SoundCube = guidReferenceApi.getObjectByOwnerAndType("Mythos", "SoundCube")
|
|
SoundCube.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])
|
|
end
|
|
|
|
return SoundCubeApi
|
|
end
|