Hi.
How to do the fade in and fade out effects in Love2D? Is it possible?
Very thanks for replies.
Fade in and fade out effects...
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Fade in and fade out effects...
I think you can use lQuery for that, but I don't know how it works.
You can do it manually by controlling the alpha:
You would change a over time.
You can do it manually by controlling the alpha:
Code: Select all
love.graphics.setColor(255, 255, 255, a)
love.graphics.draw(something, ...)
Help us help you: attach a .love.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Fade in and fade out effects...
I can't type much from here (mobile phone) try putting the alpha in a table and using tween.lua .
When I write def I mean function.
Re: Fade in and fade out effects...
Code: Select all
A = 255
How_long_it_will_take_in_seconds = 5
function love.update(dt)
A = A-(255/How_long_it_will_take_in_seconds*dt)
end
function love.draw()
--something with A as alpha
end
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot] and 7 guests