2026-11-29 03:08:03 +08:00
|
|
|
local ____exports = {}
|
2026-11-28 01:45:03 +08:00
|
|
|
local Log = require("Framework.Log")
|
|
|
|
|
local EventBus = require("Framework.EventBus")
|
|
|
|
|
local HotReload = require("Framework.HotReload")
|
2026-11-29 03:08:03 +08:00
|
|
|
function ____exports.Shutdown()
|
|
|
|
|
Log.Info("Lua GameFramework shutting down...")
|
|
|
|
|
EventBus.Clear()
|
|
|
|
|
____exports.GameInstance = nil
|
|
|
|
|
____exports.IsInitialized = false
|
|
|
|
|
_G.GameFramework = nil
|
|
|
|
|
end
|
|
|
|
|
____exports.Version = "0.1.0"
|
|
|
|
|
____exports.IsInitialized = false
|
|
|
|
|
____exports.GameInstance = nil
|
|
|
|
|
function ____exports.Init(gameInstance)
|
|
|
|
|
____exports.GameInstance = gameInstance
|
|
|
|
|
____exports.IsInitialized = true
|
2026-11-28 01:45:03 +08:00
|
|
|
_G.GameFramework = {
|
|
|
|
|
Log = Log,
|
|
|
|
|
EventBus = EventBus,
|
|
|
|
|
HotReload = HotReload,
|
2026-11-29 03:08:03 +08:00
|
|
|
Bootstrap = {Version = ____exports.Version, Init = ____exports.Init, Shutdown = ____exports.Shutdown},
|
|
|
|
|
GameInstance = gameInstance
|
2026-11-28 01:45:03 +08:00
|
|
|
}
|
2026-11-29 03:08:03 +08:00
|
|
|
Log.Info("Lua GameFramework initialized (version=%s, Lua=%s)", ____exports.Version, _VERSION)
|
2026-11-28 01:45:03 +08:00
|
|
|
end
|
2026-11-29 03:08:03 +08:00
|
|
|
return ____exports
|