{image = love.graphics.newImage("kirby.png"), x = love.graphics.getWidth ()/2, y = love.graphics.getHeight ()/2+175, sx =0.3, sy =0.3},
{image = love.graphics.newImage("Kirby running.png"), x = love.graphics.getWidth ()/2, y = love.graphics.getHeight ()/2+175, sx=0.15, sy=0.15}
}
end
function love.draw()
love.graphics.draw(para[currentFrame].image, para[currentFrame].x, para[currentFrame].y,0, para[currentFrame].sx, para[currentFrame].sy, para[currentFrame].image:getWidth()/2, para[currentFrame].image: getHeight()/2)--para selects either values 1 or 2 from variable currentFrame, each one representing one of the tables inside the parent table para, then it uses the parameter defined inside that table for a value.
end
function love.update(dt)
local elapsedTime =0
elapsedTime = elapsedTime + dt --one down if elapsedTime > 0.5 every .5 seconds the loop runs and is reset at the end.
if(love.keyboard.isDown("d"))then
currentFrame =2
for i inpairs(para)do para[i].x = para[i].x +200* dt end
--for i in pairs(para) do
--if i in para[i].x > love.graphics.getWidth () + para[currentFrame].image:getWidth () / 9 then para[currentFrame].x = 0 end