Skip to content

Commit

Permalink
Fix particle FX and maintenance
Browse files Browse the repository at this point in the history
Stop emitters on main menu when language notification is shown
Remove unused sound files from loadSoundFX()
  • Loading branch information
sekodev committed May 23, 2023
1 parent a74071b commit e506b13
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion screens/endScreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ function scene:create( event )

priceLockCoins = commonMethods.calculateLockPrice(priceLockCoins)

local tableFileNames = { "answerChosen.wav", "answerRight.wav", "answerWrong.wav", "fireworks.wav", "lockQuestionSet.wav" }
local tableFileNames = { "answerChosen.wav", "answerRight.wav", "fireworks.wav", "lockQuestionSet.wav" }
tableSoundFiles = utils.loadSoundFX(tableSoundFiles, "assets/soundFX/", tableFileNames)

checkHighScore()
Expand Down
14 changes: 13 additions & 1 deletion screens/menuScreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,12 @@ end

-- Close language notification box
local function closeLanguageNotificationBox()
menuGroup.emitterFXLeft:start()
menuGroup.emitterFXRight:start()

transition.to( menuGroup.emitterFXLeft, { time = timeWaitChoice, alpha = 1 } )
transition.to( menuGroup.emitterFXRight, { time = timeWaitChoice, alpha = 1 } )

utils.clearDisplayGroup(infoGroup)

composer.setVariable( "isLanguageOptionShown", true )
Expand Down Expand Up @@ -785,7 +791,7 @@ function scene:create( event )

priceLockCoins = commonMethods.calculateLockPrice(priceLockCoins)

local tableFileNames = { "answerChosen.wav", "answerRight.wav", "answerWrong.wav", "lockQuestionSet.wav", "campfire.mp3" }
local tableFileNames = { "answerChosen.wav", "answerRight.wav", "lockQuestionSet.wav", "campfire.mp3" }
tableSoundFiles = utils.loadSoundFX(tableSoundFiles, "assets/soundFX/", tableFileNames)

createMenuElements()
Expand Down Expand Up @@ -838,6 +844,12 @@ function scene:show( event )
local isLanguageOptionShown = composer.getVariable( "isLanguageOptionShown" )

if (not isLanguageOptionShown) then
menuGroup.emitterFXLeft:stop()
menuGroup.emitterFXRight:stop()

transition.to( menuGroup.emitterFXLeft, { time = timeWaitChoice, alpha = 0 } )
transition.to( menuGroup.emitterFXRight, { time = timeWaitChoice, alpha = 0 } )

-- Declare options for dialog box creation
local optionsLanguageOptionBox = {
fontDialog = fontLogo,
Expand Down
2 changes: 1 addition & 1 deletion screens/settingScreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ function scene:create( event )
menuGroup = display.newGroup( )
resetGroup = display.newGroup( )

local tableFileNames = { "answerChosen.wav", "answerRight.wav" }
local tableFileNames = { "answerChosen.wav" }
tableSoundFiles = utils.loadSoundFX(tableSoundFiles, "assets/soundFX/", tableFileNames)

createSettingsElements()
Expand Down

0 comments on commit e506b13

Please sign in to comment.