mirror of
https://github.com/vrld/hump.git
synced 2024-11-23 12:24:19 +00:00
Merge pull request #14 from clofresh/fix-gs-leave
Fix "self" param to the GS.leave callback
This commit is contained in:
commit
b2b033c431
@ -36,7 +36,7 @@ function GS.new(t) return t or {} end -- constructor - deprecated!
|
|||||||
function GS.switch(to, ...)
|
function GS.switch(to, ...)
|
||||||
assert(to, "Missing argument: Gamestate to switch to")
|
assert(to, "Missing argument: Gamestate to switch to")
|
||||||
local pre = current
|
local pre = current
|
||||||
;(current.leave or __NULL__)(self)
|
;(current.leave or __NULL__)(current)
|
||||||
;(to.init or __NULL__)(to)
|
;(to.init or __NULL__)(to)
|
||||||
to.init = nil
|
to.init = nil
|
||||||
current = to
|
current = to
|
||||||
|
Loading…
Reference in New Issue
Block a user