diff options
| author | Eltrac <hi@guhub.cn> | 2025-03-13 00:29:22 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-03-13 00:29:22 +0800 |
| commit | a46017a963e2f14894463ae5525429cc7612c99c (patch) | |
| tree | 8717758879ab62557f40b475f501d065c8c6a891 /main.lua | |
| parent | 8feb250231335a90d358f0ebdd53c4f29df60831 (diff) | |
refactor: move room switch trigger to door contact
due to the requirement for adding doors and door bodies before initializing body lifecycle manager, move lifecycle manager to game initialization and create more bodies with this manager
Diffstat (limited to 'main.lua')
| -rw-r--r-- | main.lua | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -4,11 +4,11 @@ require "render.sprite" require "render.speaker" local audio = require "utils.audio" local map = require "logic.map" -local bodyLifeCycleManager = require "utils.bodyLifecycleManager" local controller = require "logic.controller" local translator = require "i18n.translator" function love.load() + G = {} -- load font local myFont = love.graphics.newFont("resources/fonts/MZPXflat.ttf", 17) love.graphics.setFont(myFont) @@ -24,8 +24,6 @@ function love.load() -- initialize game state initGame() - -- body life cycle manager - G.BodyLifeCycleManager = bodyLifeCycleManager.new() -- set world callbacks G.world:setCallbacks(onContact) |
