From 87ca89364d1f8245415c4202733641d15083b971 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 27 Jul 2019 11:33:52 +0200 Subject: [PATCH] feat(actors): add an invisible wall object --- .../game/modules/world/actors/init.lua | 3 ++- .../game/modules/world/actors/invisible.lua | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 sonic-radiance.love/game/modules/world/actors/invisible.lua diff --git a/sonic-radiance.love/game/modules/world/actors/init.lua b/sonic-radiance.love/game/modules/world/actors/init.lua index 9d67a55..d89396b 100644 --- a/sonic-radiance.love/game/modules/world/actors/init.lua +++ b/sonic-radiance.love/game/modules/world/actors/init.lua @@ -8,6 +8,7 @@ Obj.index = {} Obj.index["player"] = Obj.Player Obj.collisions = {} -Obj.collisions["wall"] = require(cwd .. "wall") +Obj.collisions["wall"] = require(cwd .. "wall") +Obj.collisions["invisible"] = require(cwd .. "invisible") return Obj diff --git a/sonic-radiance.love/game/modules/world/actors/invisible.lua b/sonic-radiance.love/game/modules/world/actors/invisible.lua new file mode 100644 index 0000000..82fee54 --- /dev/null +++ b/sonic-radiance.love/game/modules/world/actors/invisible.lua @@ -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