chore: separate actors in folders

This commit is contained in:
Kazhnuz 2021-04-10 15:58:53 +02:00
parent afc15fa0e3
commit 4bf6a9b78a
6 changed files with 15 additions and 8 deletions

View file

@ -4,22 +4,22 @@ local Obj = {}
local cwd = (...):gsub('%.init$', '') .. "." local cwd = (...):gsub('%.init$', '') .. "."
Obj.Player = require(cwd .. "player") Obj.Player = require(cwd .. "player")
Obj.Gizmo = require(cwd .. "gizmo") Obj.Gizmo = require(cwd .. "gizmo")
Obj.Ring = require(cwd .. "ring")
Obj.ItemBox = require(cwd .. "itembox")
Obj.RingBox = require(cwd .. "ringbox")
Obj.Encounter = require(cwd .. "encounter")
Obj.Teleporter = require(cwd .. "teleport") Obj.Teleporter = require(cwd .. "teleport")
Obj.PNJ = require(cwd .. "pnj") Obj.PNJ = require(cwd .. "pnj")
Obj.Encounter = require(cwd .. "encounter")
Obj.loot = require(cwd .. "loot")
Obj.index = {} Obj.index = {}
Obj.index["player"] = Obj.Player Obj.index["player"] = Obj.Player
Obj.index["gizmo"] = Obj.Gizmo Obj.index["gizmo"] = Obj.Gizmo
Obj.index["ring"] = Obj.Ring
Obj.index["itembox"] = Obj.ItemBox
Obj.index["ringbox"] = Obj.RingBox
Obj.index["encounter"] = Obj.Encounter
Obj.index["teleporter"] = Obj.Teleporter Obj.index["teleporter"] = Obj.Teleporter
Obj.index["pnj"] = Obj.PNJ Obj.index["pnj"] = Obj.PNJ
Obj.index["encounter"] = Obj.Encounter
Obj.index["ring"] = Obj.loot.Ring
Obj.index["itembox"] = Obj.loot.ItemBox
Obj.index["ringbox"] = Obj.loot.RingBox
Obj.collisions = {} Obj.collisions = {}
Obj.collisions["wall"] = require(cwd .. "wall") Obj.collisions["wall"] = require(cwd .. "wall")

View file

@ -0,0 +1,7 @@
local Loot = {}
Loot.Ring = require "scenes.overworld.actors.loot.ring"
Loot.RingBox = require "scenes.overworld.actors.loot.ringbox"
Loot.ItemBox = require "scenes.overworld.actors.loot.itembox"
return Loot