This commit is contained in:
Your Name 2026-08-06 23:54:49 -04:00
parent 7c7f76b188
commit a9af97925e
12 changed files with 329 additions and 30 deletions

View file

@ -49,15 +49,13 @@ function love.update(dt)
end
function love.draw()
gameCanvas:clear()
finalCanvas:clear()
sideBarCanvas:clear()
love.graphics.setCanvas(gameCanvas)
love.graphics.clear()
love.graphics.setBlendMode("screen")
currentRoom:draw()
love.graphics.setCanvas(finalCanvas)
love.graphics.clear()
local scaleCoefficient = .93
local samples = 7
@ -78,6 +76,7 @@ function love.draw()
love.graphics.setCanvas()
love.graphics.setCanvas(sideBarCanvas)
love.graphics.clear()
editorDraw()
love.graphics.setCanvas()
@ -120,8 +119,8 @@ function love.keypressed(key)
end
function love.mousepressed(x, y, button)
if button == "r" then
currentRoom:attemptDelete(x, y)
if button == 2 then
currentRoom:attemptDelete(x, y, selectedColor)
end
editorMouseHandler(x, y, button)
end
@ -175,7 +174,7 @@ function _initSounds()
staticWave.envelope.release = 0
staticWave.envelope.sustain = 1
staticWave.envelope.decay = 0
static = love.audio.newSource(staticWave:generateSoundData())
static = love.audio.newSource((staticWave:generateSoundData()))
static:setLooping(true)
static:setVolume(.15)
static:play()