fix(boxes): correctly load textured boxes' textures

This commit is contained in:
Kazhnuz 2019-07-20 16:53:58 +02:00
parent c53e91a564
commit eb751807f4

View file

@ -27,14 +27,14 @@ local Box3D = require(cwd .. "parent")
local TexturedBox = Box3D:extend()
function TexturedBox:new(owner, w, h, d, topTexture, bottomTexture)
TexturedBox.super.new(self, owner, w, h, d)
local bottomTexture = bottomTexture or topTexture
self.topTexture = self.assets.texture[topTexture]
self.bottomTexture = self.assets.texture[bottomTexture]
self.topTexture = owner.assets.images[topTexture]
self.bottomTexture = owner.assets.images[bottomTexture]
self.haveLine = false
TexturedBox.super.new(self, owner, w, h, d)
end
function TexturedBox:drawTopTexture()