local ____exports = __module.env local Log = __MODULE__.Import("Framework.Log", __module) local EventBus = __MODULE__.Import("Framework.EventBus", __module) local HotReload = __MODULE__.Import("Framework.HotReload", __module) function ____exports.Shutdown() Log.Info("Lua GameFramework shutting down...") EventBus.Clear() ____exports.GameInstance = nil ____exports.IsInitialized = false _G.GameFramework = nil end ____exports.Version = "0.2.0" --- -- @module_data ____exports.IsInitialized = false --- -- @module_data ____exports.GameInstance = nil function ____exports.Init(gameInstance) ____exports.GameInstance = gameInstance ____exports.IsInitialized = true _G.GameFramework = { Log = Log, EventBus = EventBus, HotReload = HotReload, Bootstrap = {Version = ____exports.Version, Init = ____exports.Init, Shutdown = ____exports.Shutdown}, GameInstance = gameInstance } Log.Info("Lua GameFramework initialized (version=%s, Lua=%s)", ____exports.Version, _VERSION) end function __module.StashData(env, to) local ____has = to.__has__ if not ____has then ____has = {} to.__has__ = ____has end to.IsInitialized = ____exports.IsInitialized ____has.IsInitialized = true to.GameInstance = ____exports.GameInstance ____has.GameInstance = true end function __module.RestoreData(env, from) local ____has = from.__has__ if not ____has then return end if ____has.IsInitialized then ____exports.IsInitialized = from.IsInitialized end if ____has.GameInstance then ____exports.GameInstance = from.GameInstance end end function __module.UpdateImports() end