feat(actors): add a textured block collision
This commit is contained in:
parent
26d3dbd34d
commit
7fe34ed316
2 changed files with 16 additions and 1 deletions
|
@ -10,6 +10,7 @@ Obj.index["player"] = Obj.Player
|
|||
Obj.collisions = {}
|
||||
Obj.collisions["wall"] = require(cwd .. "wall")
|
||||
Obj.collisions["invisible"] = require(cwd .. "invisible")
|
||||
Obj.collisions["floor"] = require(cwd .. "floor")
|
||||
Obj.collisions["floor"] = require(cwd .. "floor")
|
||||
Obj.collisions["textured"] = require(cwd .. "textured")
|
||||
|
||||
return Obj
|
||||
|
|
14
sonic-radiance.love/game/modules/world/actors/textured.lua
Normal file
14
sonic-radiance.love/game/modules/world/actors/textured.lua
Normal 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
|
Loading…
Reference in a new issue