feat(actors): add an invisible wall object
This commit is contained in:
parent
2f7720d3bb
commit
87ca89364d
2 changed files with 15 additions and 1 deletions
|
@ -8,6 +8,7 @@ Obj.index = {}
|
||||||
Obj.index["player"] = Obj.Player
|
Obj.index["player"] = Obj.Player
|
||||||
|
|
||||||
Obj.collisions = {}
|
Obj.collisions = {}
|
||||||
Obj.collisions["wall"] = require(cwd .. "wall")
|
Obj.collisions["wall"] = require(cwd .. "wall")
|
||||||
|
Obj.collisions["invisible"] = require(cwd .. "invisible")
|
||||||
|
|
||||||
return Obj
|
return Obj
|
||||||
|
|
13
sonic-radiance.love/game/modules/world/actors/invisible.lua
Normal file
13
sonic-radiance.love/game/modules/world/actors/invisible.lua
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
local Base = require "core.modules.world.actors.actor3D"
|
||||||
|
local Invisible = Base:extend()
|
||||||
|
|
||||||
|
function Invisible:new(world, x, y, z, w, h, d)
|
||||||
|
Invisible.super.new(self, world, "wall", x, y, z, w, h, d, true)
|
||||||
|
self:setDebugColor(0,0,0)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Invisible:update(dt)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
return Invisible
|
Loading…
Reference in a new issue