this is the code i am working with
Code: Select all
local Renderer = require "tools/renderer"
renderer = Renderer:create()
function createBox(x,y)
local b ={}
b.x = x or 0
b.y = y or 0
function b:load()
renderer:addRenderer(self,1)
end
function b:draw()
love.graphics.setColor(math.random(0,255),math.random(0,255),math.random(0,255))
love.graphics.rectangle("fill",self.x,self.y,64,64)
end
return b
end
function love.load()
rl = createBox(64,64)
r2 = createBox(96,96)
r1:load()
r2:load()
end
function love.update(dt)
end
function love.draw()
renderer:draw()
end