Started implementing game states and intro.

This commit is contained in:
2025-09-28 02:14:41 -04:00
parent 6fdad4e408
commit 56366e4db9
7 changed files with 291 additions and 24 deletions

58
src/gstate.lua Normal file
View File

@@ -0,0 +1,58 @@
------------------------------------------------------------------------------
-- Imports
------------------------------------------------------------------------------
local make_class = require 'src.classes'
------------------------------------------------------------------------------
-- Class definitions
------------------------------------------------------------------------------
local GameState = make_class()
------------------------------------------------------------------------------
-- Class methods
------------------------------------------------------------------------------
function GameState:_init(name, index)
self.name = name
self.index = index
self.valid = false
end
function GameState:load()
end
function GameState:update(_)
return self.index
end
function GameState:draw()
end
function GameState:unload()
end
function GameState:keypressed(_)
end
function GameState:mousemoved(_, _)
end
function GameState:mousepressed(_, _, _)
end
------------------------------------------------------------------------------
-- Module return
------------------------------------------------------------------------------
return GameState