use the resource table for audio samples
This commit is contained in:
parent
f227df0dee
commit
7704c45dd0
|
@ -351,7 +351,7 @@ end
|
|||
|
||||
local function render(deltaTime)
|
||||
if not playedBgm then
|
||||
game.PlaySample("titlescreen/bgm.wav", true)
|
||||
game.PlaySample(resources.audiosamples.bgm, true)
|
||||
playedBgm = true
|
||||
end
|
||||
|
||||
|
@ -387,15 +387,15 @@ local function onKnobsChange(direction)
|
|||
if ((cursorIndex > oldCursorIndex and not (cursorIndex == 6 and oldCursorIndex == 1)) or
|
||||
(cursorIndex == 1 and oldCursorIndex == 6)) then scrollingUp = true end
|
||||
|
||||
game.PlaySample("titlescreen/cursor_change.wav")
|
||||
game.PlaySample(resources.audiosamples.cursorChange)
|
||||
|
||||
oldCursorIndex = cursorIndex
|
||||
end
|
||||
|
||||
local function onButtonPressed(button)
|
||||
if button == game.BUTTON_STA then
|
||||
game.PlaySample("titlescreen/cursor_select.wav")
|
||||
game.StopSample("titlescreen/bgm.wav")
|
||||
game.PlaySample(resources.audiosamples.cursorSelect)
|
||||
game.StopSample(resources.audiosamples.bgm)
|
||||
|
||||
callButtonAction()
|
||||
|
||||
|
@ -418,8 +418,8 @@ local function onMousePressed(button)
|
|||
|
||||
if util.areaOverlap(mousePosX, mousePosY,
|
||||
miscButtons.mainButton.x, miscButtons.mainButton.y, miscButtons.mainButton.w, miscButtons.mainButton.h) then
|
||||
game.StopSample("titlescreen/bgm.wav")
|
||||
game.PlaySample("titlescreen/cursor_select.wav")
|
||||
game.StopSample(resources.audiosamples.bgm)
|
||||
game.PlaySample(resources.audiosamples.cursorSelect)
|
||||
callButtonAction()
|
||||
return
|
||||
|
||||
|
@ -453,7 +453,7 @@ local function onMousePressed(button)
|
|||
end
|
||||
|
||||
cursorIndex = (cursorIndex - 1 + changeIndex) % #buttons + 1
|
||||
game.PlaySample("titlescreen/cursor_change.wav")
|
||||
game.PlaySample(resources.audiosamples.cursorChange)
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue