From 41a2eb051894b3e79f93b7b5ea18996810ba3a8c Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 16 Mar 2019 13:15:25 +0100 Subject: [PATCH] gamecore: load classic globally at start --- README.md | 1 - gamecore/init.lua | 3 ++- main.lua | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2c96eab..3b0904d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ Gamecore use [Classic](https://github.com/rxi/classic/) as its base Object To load gamecore, you basically need the following code. ```` -Object = require "libs.classic" Core = require "gamecore" function love.load() diff --git a/gamecore/init.lua b/gamecore/init.lua index 0aa544c..101f49c 100644 --- a/gamecore/init.lua +++ b/gamecore/init.lua @@ -29,7 +29,8 @@ local cwd = (...):gsub('%.init$', '') .. "." -- Load in the global namespace utilities that'll need to be reusable everywhere -- in the game -utils = require require(cwd .. "utils") +Object = require(cwd .. "libs.classic") +utils = require(cwd .. "utils") local CoreSystem = Object:extend() diff --git a/main.lua b/main.lua index e45ead5..6fd8d88 100644 --- a/main.lua +++ b/main.lua @@ -21,7 +21,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -Object = require "libs.classic" Core = require "gamecore" function love.load()