From 0b072eecad351bcb9b30bc764dd9446da2ff97ac Mon Sep 17 00:00:00 2001 From: NCLanceman Date: Wed, 26 Mar 2025 20:36:40 -0500 Subject: [PATCH] lil bit of movement code --- main.lua | 4 ++++ player.lua | 4 ++++ 2 files changed, 8 insertions(+) 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