Hello, I have an issue where my game is applying the last shape color to my jpg image.
My game loads a background image and then loads a table of shape objects. Each shape object has a different color which appears correctly. However, when the game opens the last shape color is applied to the image.
Here is my main lua code
function love.load() -- load game love.graphics.setColor(255, 255, 255, 255) love.graphics.setBackgroundColor(255, 255, 255, 255) vader = love.graphics.newImage(Levels.loadBg(1,"vader.jpg")) -- load players loadPlayers = Player:loadPlayers(Levels.shapes) end function love.draw () love.graphics.draw(vader,world.centerX /2,0,0,0.4,0.4 ) Player:drawAll() end
The Player:drawAll() method is looping all shapes and drawing them to the page using these lines.
love.graphics.setColor(fillcolor) love.graphics.rectangle(mode, x, y,width, height)