fix(boxes): correctly load textured boxes' textures
This commit is contained in:
parent
c53e91a564
commit
eb751807f4
1 changed files with 4 additions and 4 deletions
|
@ -27,14 +27,14 @@ local Box3D = require(cwd .. "parent")
|
||||||
local TexturedBox = Box3D:extend()
|
local TexturedBox = Box3D:extend()
|
||||||
|
|
||||||
function TexturedBox:new(owner, w, h, d, topTexture, bottomTexture)
|
function TexturedBox:new(owner, w, h, d, topTexture, bottomTexture)
|
||||||
TexturedBox.super.new(self, owner, w, h, d)
|
|
||||||
|
|
||||||
local bottomTexture = bottomTexture or topTexture
|
local bottomTexture = bottomTexture or topTexture
|
||||||
|
|
||||||
self.topTexture = self.assets.texture[topTexture]
|
self.topTexture = owner.assets.images[topTexture]
|
||||||
self.bottomTexture = self.assets.texture[bottomTexture]
|
self.bottomTexture = owner.assets.images[bottomTexture]
|
||||||
|
|
||||||
self.haveLine = false
|
self.haveLine = false
|
||||||
|
|
||||||
|
TexturedBox.super.new(self, owner, w, h, d)
|
||||||
end
|
end
|
||||||
|
|
||||||
function TexturedBox:drawTopTexture()
|
function TexturedBox:drawTopTexture()
|
||||||
|
|
Loading…
Reference in a new issue