clearAllSFXEmitters
Definition
-- @/lua/ge/extensions/core/audioRibbon.lua:415
-- Clears all SFX emitters.
local function clearAllSFXEmitters()
for i = 1, 5 do
for _, sfxEmitterByAxis in pairs(sfxEmitters[i]) do
if sfxEmitterByAxis.emitter and simObjectExists(sfxEmitterByAxis.emitter) then
sfxEmitterByAxis.emitter:delete()
end
end
end
sfxEmitters = { {}, {}, {}, {}, {} }
end
Callers
@/lua/ge/extensions/core/audioRibbon.lua
local function removeRibbon(idx)
clearAllSFXEmitters()
local ribbon = ribbons[idx]
@/lua/ge/extensions/editor/audioRibbonEditor.lua
audioRibbon.recomputeMap()
audioRibbon.clearAllSFXEmitters() -- Ensure all the active SFX emitter objects are removed. They will be recreated on the next frame.
audioRibbon.clearNearFarLists() -- Ensure all the near/far lists are cleared. They will be recreated on the next frame.
local function updateEvent(ribbon)
audioRibbon.clearAllSFXEmitters()
ribbon.emitters[1].eventNameStr = ffi.string(ambientEventBinding)
local statePre = copyRibbonsState()
audioRibbon.clearAllSFXEmitters()
ribbon.isEnabled = not ribbon.isEnabled
local statePre = copyRibbonsState()
audioRibbon.clearAllSFXEmitters()
selRibbon.isAmbient = not selRibbon.isAmbient