sonic-radiance/sonic-radiance.love/core/modules/transitions/circle.lua

16 lines
566 B
Lua
Raw Normal View History

2021-04-02 22:00:33 +02:00
local TransitionParent = require "core.modules.transitions.canvas"
local DefaultTransition = TransitionParent:extend()
function DefaultTransition:new(func, ox, oy, fadeOut)
DefaultTransition.super.new(self, func, ox, oy, fadeOut, "inQuad", "outQuad", 0.8, 0.1)
2021-04-02 22:00:33 +02:00
end
function DefaultTransition:drawCanvas()
love.graphics.setColor(0,0,0,1)
love.graphics.rectangle("fill", 0, 0, 424, 240)
utils.graphics.resetColor()
local value = 1 - self.value
2021-04-05 12:29:34 +02:00
love.graphics.circle("fill",self.ox, self.oy, (424/2) * 1.5 * value)
2021-04-02 22:00:33 +02:00
end
return DefaultTransition