Utilities for game development using the Defold engine
NEW: Added ability to group different flow instances and wait for an entire group of flows using flow.until_group()
. Thanks to @astrochili for the contribution!
NEW: Added flow.until_flows()
to wait until all sub-flows are finished. Thanks @Vbif
CHANGE: Improved flow error message by showing traceback on error. Thanks @Vbif
NEW: flow.collectionfactory_load(url) to load collection factory resources NEW: flow.factory_load(url) to load factory resources NEW: flow.async_load(url) to async load a collection proxy
BREAKING CHANGE: Coroutine Flows are now started immediately when calling flow.start() as opposed to the old behaviour where they started on the next frame
FIX: The timing in ludobits.m.flow() updates was not accurate and caused a gradually increasing gap between calculated and actual time.
NEW: ludobits.m.savetable has new functionality to save and load using both sys.* and io.* (w. json encoding)
-- load file using sys.load() (or create file if it doesn't exist)
local data = savetable.load(filename, "sys") -- or "io" for use of io.open and io.read
-- update table value
data.foo = "bar"
-- save table using sys.save()
savetable.save(data)
And:
local data = { foo = "bar" }
savetable.save(data, filename, "io") -- or "sys" for use of sys.save
NEW: flow.until_message(), flow.until_any_message() and flow.until_input() will resume the flow immediately instead of waiting one frame.
FIX: Incorrect syntax for sequence.wait_until_true()/false()
NEW: sequence.wait_until_true() and wait_until_false()