Skip to content

Commit

Permalink
Deprecate gamestate constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
vrld committed Feb 20, 2013
1 parent f080a9c commit 5b1b67b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gamestate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ local function __ERROR__() error("Gamestate not initialized. Use Gamestate.switc
local current = {leave = __NULL__}

local GS = {}
function GS.new()
return setmetatable({}, {__index = function() return __NULL__ end})
end
function GS.new(t) return t or {} end -- constructor - deprecated!

function GS.switch(to, ...)
assert(to, "Missing argument: Gamestate to switch to")
Expand Down

0 comments on commit 5b1b67b

Please sign in to comment.