feat(actors): add a textured block collision

This commit is contained in:
Kazhnuz 2019-07-27 15:10:50 +02:00
parent 26d3dbd34d
commit 7fe34ed316
2 changed files with 16 additions and 1 deletions

View file

@ -11,5 +11,6 @@ Obj.collisions = {}
Obj.collisions["wall"] = require(cwd .. "wall")
Obj.collisions["invisible"] = require(cwd .. "invisible")
Obj.collisions["floor"] = require(cwd .. "floor")
Obj.collisions["textured"] = require(cwd .. "textured")
return Obj

View file

@ -0,0 +1,14 @@
local Base = require "core.modules.world.actors.actor3D"
local Textured = Base:extend()
function Textured:new(world, x, y, z, w, h, d, top, bottom)
Textured.super.new(self, world, "wall", x, y, z, w, h, d, true)
self:setDebugColor(0,0,0)
self.boxes.Textured(self, w, h, d, top, bottom)
end
function Textured:update(dt)
end
return Textured