From d3e5889fa9d93f612a2fd5817d4849e96221121a Mon Sep 17 00:00:00 2001 From: Eltrac Date: Tue, 4 Mar 2025 10:41:31 +0800 Subject: refactor: move room connection logic to room object --- config.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'config.lua') diff --git a/config.lua b/config.lua index 64a640b..643bdf5 100644 --- a/config.lua +++ b/config.lua @@ -30,6 +30,7 @@ config = { -- game default states function initGame() + local intialMap = map.generate(7) G = { player = Player:new(), shots = {}, @@ -38,7 +39,9 @@ function initGame() time = 0, lastSummonTime = 0, - currentRoom = map.generate(7), -- change amount of rooms here + + allRooms = intialMap, + currentRoom = intialMap[1], -- change amount of rooms here roomCleared = 0, } end -- cgit v1.2.3