Hello!..I’m new to defold!..BTW i want to learn something about GUI and transition…can you tell me how can i make a simple fadein-pause-fadeout animation…i know already how to make a fade-in and fade-out transitions(thanks for some cool examples) but what i need is on how can i put a pause(probably 1-2sec) between the fadein and fadeout transitions?..any help is appreciated!..
here’s my code so far:
function init(self)
intro_fadein(self)
intro_fadeout(self)
end
function intro_fadein(self)
for i=1,2 do
gui.set_color(gui.get_node("intro"..i), vmath.vector4(1,1,1,0))
gui.animate(gui.get_node("intro"..i), gui.PROP_COLOR, vmath.vector4(1,1,1,1), gui.EASING_LINEAR, 2.5, 0)
end
end
function intro_fadeout(self)
for i=1,2 do
gui.set_color(gui.get_node("intro"..i), vmath.vector4(1,1,1,1))
gui.animate(gui.get_node("intro"..i), gui.PROP_COLOR, vmath.vector4(0,0,0,0), gui.EASING_LINEAR, 2.5, 0)
end
end