diff --git a/sonic-radiance.love/core/modules/world/actors/utils/boxes/parent.lua b/sonic-radiance.love/core/modules/world/actors/utils/boxes/parent.lua index 314cbab..45c570b 100644 --- a/sonic-radiance.love/core/modules/world/actors/utils/boxes/parent.lua +++ b/sonic-radiance.love/core/modules/world/actors/utils/boxes/parent.lua @@ -37,7 +37,11 @@ function Box3D:new(owner, w, h, d, isVisible) self.shadowSources = {} self.needRedraw = false - self.isVisible = isVisible or true + if (isVisible == nil) then + self.isVisible = true + else + self.isVisible = isVisible + end if (self.isVisible) then self:setTexture() diff --git a/sonic-radiance.love/game/modules/world/actors/floor.lua b/sonic-radiance.love/game/modules/world/actors/floor.lua new file mode 100644 index 0000000..12cc5ce --- /dev/null +++ b/sonic-radiance.love/game/modules/world/actors/floor.lua @@ -0,0 +1,14 @@ +local Base = require "core.modules.world.actors.actor3D" +local Floor = Base:extend() + +function Floor:new(world, x, y, z, w, h, d) + Floor.super.new(self, world, "wall", x, y, z, w, h, d, true) + self:setDebugColor(0,0,0) + self.boxes.Base(self, w, h, d, false) +end + +function Floor:update(dt) + +end + +return Floor diff --git a/sonic-radiance.love/game/modules/world/actors/init.lua b/sonic-radiance.love/game/modules/world/actors/init.lua index d89396b..43f562d 100644 --- a/sonic-radiance.love/game/modules/world/actors/init.lua +++ b/sonic-radiance.love/game/modules/world/actors/init.lua @@ -10,5 +10,6 @@ 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") return Obj