fade colors

This commit is contained in:
2021-12-19 12:34:59 +01:00
parent a9f618cdfc
commit 541def8c7c
3 changed files with 3 additions and 3 deletions

View File

@@ -29,5 +29,5 @@ function FadeInState:render()
love.graphics.setColor(self.r, self.g, self.b, self.opacity) love.graphics.setColor(self.r, self.g, self.b, self.opacity)
love.graphics.rectangle('fill', 0, 0, VIRTUAL_WIDTH, VIRTUAL_HEIGHT) love.graphics.rectangle('fill', 0, 0, VIRTUAL_WIDTH, VIRTUAL_HEIGHT)
love.graphics.setColor(1/255, 1/255, 1/255, 1/255) love.graphics.setColor(255/255, 255/255, 255/255, 255/255)
end end

View File

@@ -33,5 +33,5 @@ function FadeOutState:render()
love.graphics.setColor(self.r, self.g, self.b, self.opacity) love.graphics.setColor(self.r, self.g, self.b, self.opacity)
love.graphics.rectangle('fill', 0, 0, VIRTUAL_WIDTH, VIRTUAL_HEIGHT) love.graphics.rectangle('fill', 0, 0, VIRTUAL_WIDTH, VIRTUAL_HEIGHT)
love.graphics.setColor(1/255, 1/255, 1/255, 255/255) love.graphics.setColor(255/255, 255/255, 255/255, 255/255)
end end

View File

@@ -11,7 +11,7 @@ end
function StartState:update(dt) function StartState:update(dt)
if love.keyboard.wasPressed('enter') or love.keyboard.wasPressed('return') then if love.keyboard.wasPressed('enter') or love.keyboard.wasPressed('return') then
gStateStack:push(FadeInState({ gStateStack:push(FadeInState({
r = 255/255, g = 255/255, b = 255/255 r = 1/255, g = 1/255, b = 1/255
}, 1, }, 1,
function() function()
gSounds['intro-music']:stop() gSounds['intro-music']:stop()