Added options menu and menu transitions.

This commit is contained in:
2025-10-06 01:07:33 -04:00
parent 719a9cd0f6
commit 9561db2847
9 changed files with 253 additions and 51 deletions

View File

@@ -65,14 +65,18 @@ end
function AssetManager:update(owner)
if self.assets[owner] ~= nil then
if self.co == nil then
self.co = coroutine.create(_load)
if self.assets[owner].co == nil then
self.assets[owner].co = coroutine.create(_load)
end
local errorfree, retval = coroutine.resume(self.co, self, owner)
local errorfree, retval = coroutine.resume(self.assets[owner].co, self, owner)
if errorfree then
self.assets[owner].done = retval
if retval then
self.assets[owner].co = nil
end
else
error(retval)
end
@@ -96,6 +100,7 @@ function AssetManager:register(owner, asset)
if self.assets[owner] == nil then
self.assets[owner] = {
done = false,
co = nil,
}
end