diff --git a/main.lua b/main.lua index c603e07..a220305 100644 --- a/main.lua +++ b/main.lua @@ -12,3 +12,7 @@ end function love.draw() player:draw() end + +function love.keypressed(key) + player:keyPressed(key) +end diff --git a/player.lua b/player.lua index 4a392e3..3d97dfd 100644 --- a/player.lua +++ b/player.lua @@ -21,3 +21,7 @@ function Player:draw() local vert = { self.x, self.y, (self.x - 70), (self.y + 70), (self.x + 70), (self.y + 70) } love.graphics.polygon("fill", vert) end + +function Player:keyPressed(key) + --Add controls here +end