- Reestructuració completa
This commit is contained in:
15
data/utils/app.lua
Normal file
15
data/utils/app.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
app = {
|
||||
update = nil,
|
||||
stack = {},
|
||||
}
|
||||
|
||||
function app.push(func)
|
||||
table.insert(app.stack, app.update)
|
||||
app.update = func
|
||||
end
|
||||
|
||||
function app.pop()
|
||||
if #app.stack > 0 then
|
||||
app.update = table.remove(app.stack)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user