feat(action3D): add box objects
This commit is contained in:
parent
107b75c3ed
commit
cbebb16c46
2 changed files with 13 additions and 1 deletions
10
examples/gameplay/action3D/actors/box.lua
Normal file
10
examples/gameplay/action3D/actors/box.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
local Base = require "gamecore.modules.world.actors.actor3D"
|
||||
local Box = Base:extend()
|
||||
|
||||
function Box:new(world, x, y, z)
|
||||
Box.super.new(self, world, "box", x, y, z, 16, 16, 16, true)
|
||||
self:setDebugColor(0,0,0)
|
||||
self.boxes.Textured(self, 16, 16, 16, "boxtop", "box")
|
||||
end
|
||||
|
||||
return Box
|
|
@ -3,9 +3,11 @@ local Obj = {}
|
|||
-- On charge toutes les différentes types d'acteurs
|
||||
local cwd = (...):gsub('%.init$', '') .. "."
|
||||
Obj.Player = require(cwd .. "player")
|
||||
Obj.Box = require(cwd .. "box")
|
||||
|
||||
Obj.index = {}
|
||||
Obj.index["player"] = Obj.Player
|
||||
Obj.index["box"] = Obj.Box
|
||||
|
||||
Obj.collisions = {}
|
||||
Obj.collisions["wall"] = require(cwd .. "wall")
|
||||
|
|
Loading…
Reference in a new issue