It is a simple tool based on coroutine and targets at implementing a serial of actions in a straightforward and human-readable way.
for example:
Code: Select all
local lc = require("LoveCoroutine")()
lc:run(function()
A:moveDown()
lc:waitTime(3)
A:moveRight()
lc:waitTime(2)
A:moveDown()
lc:waitTime(1)
-- Other actions
end)
function love.update(dt)
lc:update(dt)
end
For more detail, read here.
However, it seems just a practise. It needs more test and improvement. I need help to make it suitable for game development.
Reference projects: