30 lines
591 B
Lua
Raw Normal View History

require "lib/keys"
require "lib/functions"
2017-07-05 07:11:51 -07:00
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
2017-07-05 07:11:51 -07:00
player.width = 25
player.height = 5
2017-07-22 14:54:01 -07:00
player.speed = 10
2017-07-05 07:11:51 -07:00
end
function love.update(dt)
player = check_keys(player)
end
2017-07-16 13:15:47 -07:00
2017-07-05 07:11:51 -07:00
function love.draw()
love.graphics.rectangle("line", player.x, player.y, player.width, player.height)
end