Skip to content

Commit

Permalink
reorganizing, button soundFX
Browse files Browse the repository at this point in the history
  • Loading branch information
Azzla committed Jul 26, 2022
1 parent cbbd83e commit bcb0942
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 9 deletions.
4 changes: 0 additions & 4 deletions button.lua

This file was deleted.

7 changes: 6 additions & 1 deletion main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function love.load()
love.graphics.setDefaultFilter("nearest", "nearest")

love.window.setMode(0, 0)
--love.window.setMode(1920, 1080)
-- love.window.setMode(1920, 1080)
screen_width = love.graphics.getWidth()
screen_height = love.graphics.getHeight()
love.window.setFullscreen(true, "desktop")
Expand Down Expand Up @@ -224,6 +224,11 @@ function love.draw()

love.graphics.printf("PAUSED", originXCenter - 130, originYCenter - 10, 999, "left", nil, 4, 4)



ret1,ret2 = cam:mousePosition()
love.graphics.draw(reticle, ret1, ret2,nil,nil,nil,3,3)

cam:detach()
elseif round.gameState == 1 then
gameOverScreen()
Expand Down
3 changes: 3 additions & 0 deletions menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ function drawMenuButtons()
end
--check for click
if love.mouse.isDown(1) and not oldmousedown and isHot then
if not soundFX.collectCoin.m1:isPlaying() then love.audio.play(soundFX.collectCoin.m1) else
love.audio.play(soundFX.collectCoin.m5)
end
button.fn()
end
end
Expand Down
8 changes: 4 additions & 4 deletions sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ function loadSoundFX()
soundFX.annihilate:setVolume(.2)

soundFX.collectCoin.m1:setVolume(1)
soundFX.collectCoin.m2:setVolume(.2)
soundFX.collectCoin.m3:setVolume(.3)
soundFX.collectCoin.m4:setVolume(.4)
soundFX.collectCoin.m5:setVolume(.5)
soundFX.collectCoin.m2:setVolume(.3)
soundFX.collectCoin.m3:setVolume(.5)
soundFX.collectCoin.m4:setVolume(.7)
soundFX.collectCoin.m5:setVolume(1)
end

function playMusic()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit bcb0942

Please sign in to comment.