feat(action3D): add box objects

This commit is contained in:
Kazhnuz 2019-07-20 16:55:06 +02:00
parent 107b75c3ed
commit cbebb16c46
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,10 @@
local Base = require "gamecore.modules.world.actors.actor3D"
local Box = Base:extend()
function Box:new(world, x, y, z)
Box.super.new(self, world, "box", x, y, z, 16, 16, 16, true)
self:setDebugColor(0,0,0)
self.boxes.Textured(self, 16, 16, 16, "boxtop", "box")
end
return Box

View File

@ -2,10 +2,12 @@ local Obj = {}
-- On charge toutes les différentes types d'acteurs
local cwd = (...):gsub('%.init$', '') .. "."
Obj.Player = require(cwd .. "player")
Obj.Player = require(cwd .. "player")
Obj.Box = require(cwd .. "box")
Obj.index = {}
Obj.index["player"] = Obj.Player
Obj.index["box"] = Obj.Box
Obj.collisions = {}
Obj.collisions["wall"] = require(cwd .. "wall")