However i have a question about the multiple images drawing at different timing, the following is the situation that i am trying to achieve:
- The time line order is A to B to C to D
- During time A to B, draw image1 and image2
- During time B to C, draw image1, image2, image3 and image4
- During time C to D, draw image3 and image4
But the result i got is that the game draws imageA and imageC until time reaches C, then starts to draw imageB and imageD until time reaches D.
The following is the lua scripting:
Code: Select all
function draw()
if elapsed >= 1.0 and elapsed <= 10.0 then
love.graphics.draw(image1, 100, 100)
love.graphics.draw(image2, 200, 100)
elseif elapsed >= 6.0 and elapsed <= 12.0 then
love.graphics.draw(image3, 300, 100)
love.graphics.draw(image4, 400, 100)
end
end
Code: Select all