I tried this but it didn't work:
Code: Select all
quad_box = love.graphics.newQuad(0, 0, 50, 50, img_tileset:getWidth(), img_tileset:getHeight())
x = quad_box:getHeight()
Code: Select all
quad_box = love.graphics.newQuad(0, 0, 50, 50, img_tileset:getWidth(), img_tileset:getHeight())
x = quad_box:getHeight()
Code: Select all
solid = class { function(self, x, y, w, h, img)
self.width = w or 64
self.height = h or 64
self.shape = collider:addRectangle(x - (self.width / 2), y - (self.height / 2), self.width, self.height)
collider:setPassive(self.shape)
self.img = img or "rock"
if img[self.img] == nil then
img[self.img] = love.graphics.newImage("media/ents/".. self.img ..".png")
img[self.img]:setWrap("repeat", "repeat")
end
self.quad = love.graphics.newQuad(0, 0, self.width, self.height, 64, 64)
end }
Users browsing this forum: Bing [Bot] and 8 guests