29 lines
589 B
Lua

require "lib/keys"
require "lib/functions"
function love.load()
saveFile = "test.lua"
-- Create a table and grab the screen width/height
screen = {}
screen.width = love.graphics.getWidth()
screen.height = love.graphics.getHeight()
-- Create a table to hold all the player data
player = {}
player.x = screen.width /2
player.y = screen.height - 50
player.width = 25
player.height = 5
player.speed = 5
end
function love.update(dt)
player = check_keys(player)
end
function love.draw()
love.graphics.rectangle("line", player.x, player.y, player.width, player.height)
end