Page 1 of 1

how to make a text flash?

Posted: Sat Feb 23, 2019 3:55 pm
by Bernard51
Hello

I am trying to do for my text blink thanks

Re: how to make a text flash?

Posted: Sat Feb 23, 2019 4:25 pm
by grump
Simple ad hoc idea:

Code: Select all

local speed = 2

function love.draw()
	local a = math.abs(math.cos(love.timer.getTime() * speed % 2 * math.pi))
	love.graphics.setColor(1, 1, 1, a)
	love.graphics.print("Blink.")
end

Re: how to make a text flash?

Posted: Sat Feb 23, 2019 4:52 pm
by Bernard51
Thank you