my question is; how do I display an integer?
my code is this:
Code: Select all
water = {}
function water.load()
waterGFX = {
love.graphics.newImage("waterbackground1.png"),
love.graphics.newImage("waterbackground2.png"),
}
waterFRAME = 1
end
function water.update(dt)
waterFRAME = waterFRAME + 10 * dt
if waterFRAME > 1 then waterFRAME = 0 end
end
function water.draw()
love.graphics.draw(waterGFX[waterFRAME],camera.x,camera.y + 256)
end
the aim is to have a animation with two frames and use the frame number (waterFRAME) as a counter and frame indicator
I feel stupid asking this as it seems such a simple thing, but I have looked on Google and these forums and surprisingly found nothing.
any help would be appreciated