improvement: use the framework namespace

This commit is contained in:
Kazhnuz 2022-08-12 10:46:22 +02:00
parent 69a567e4c2
commit d5f446f4ed
2 changed files with 11 additions and 10 deletions

View file

@ -1,4 +1,5 @@
-- birb :: The main birb script, loading the core and main utilities
-- framework :: The main Épervier Framework script, loading the core and main
-- utilities
--[[
Copyright © 2021 Kazhnuz
@ -21,7 +22,7 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
birb = {}
framework = {}
-- GLOBAL UTILS/FUNCTION LOADING
-- Load in the global namespace utilities that'll need to be reusable everywhere
@ -31,20 +32,20 @@ Object = require("birb.libs.classic")
utils = require("birb.utils")
enum = require("birb.utils.enum")
birb.Core = require("birb.core")
framework.Core = require("birb.core")
function birb.start(gamemodule, args)
birb.startCore(args)
function framework.start(gamemodule, args)
framework.startCore(args)
if (gamemodule ~= nil) then
birb.startGame(gamemodule)
framework.startGame(gamemodule)
end
end
function birb.startCore(args)
core = birb.Core(args)
function framework.startCore(args)
core = framework.Core(args)
end
function birb.startGame(gamemodule)
function framework.startGame(gamemodule)
local GameObject = require(gamemodule)
game = GameObject()
end

View file

@ -27,6 +27,6 @@ scenes = require "scenes"
function love.load(args)
print(utils.table.toString(args))
birb.start("game", args)
framework.start("game", args)
scenes.MainMenu()
end