We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
So I was using the infamous gamestate library, and I stumbled across something odd;
The order that the callbacks are executed in don't seem to correlate with love's callbacks;
In love, the love.update is called before love.draw, whereas when gamestate has a foo:update and foo:draw, it calls foo:draw first, then foo:update.
love.update
love.draw
foo:update
foo:draw
This Inconsistancy threw me off, and if possible, it would be nice if reversed.
My current workaround is to use :init or :enter to set the variables before the library :draw's.
:init
:enter
:draw
The text was updated successfully, but these errors were encountered:
That's odd, because hump simply injects inself into the love callbacks, similar to this:
local _update = love.update function love.update(dt) _update(dt) GS.update(dt) end
Do you call GS.switch() inside love.update() or state:update()?
GS.switch()
love.update()
state:update()
Sorry, something went wrong.
I do call love.update(), which means I am screwing up the state context; so in the end, this is my fault.
I thought gamestate would finish up the state as is, and it would switch the state once the whole love.run loop finished; so this would be user error.
love.run
Would that make sense as a feature request, to ask gamestate to finish up the current callbacks for the "cycle", and then switch after?
Should be fixed by 3c666c5
No branches or pull requests
So I was using the infamous gamestate library, and I stumbled across something odd;
The order that the callbacks are executed in don't seem to correlate with love's callbacks;
In love, the
love.update
is called beforelove.draw
, whereas when gamestate has afoo:update
andfoo:draw
, it callsfoo:draw
first, thenfoo:update
.This Inconsistancy threw me off, and if possible, it would be nice if reversed.
My current workaround is to use
:init
or:enter
to set the variables before the library:draw
's.The text was updated successfully, but these errors were encountered: