summaryrefslogtreecommitdiffhomepage
path: root/player.lua
diff options
context:
space:
mode:
Diffstat (limited to 'player.lua')
-rw-r--r--player.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/player.lua b/player.lua
index 70446b4..a0599a3 100644
--- a/player.lua
+++ b/player.lua
@@ -293,6 +293,11 @@ function Player:draw (offset_x, offset_y, scale, debug)
end
end
+-- getPosition
+function Player:getPosition()
+ return self.body:getPosition()
+end
+
-- Draw HUD of `Player`
-- elevation: 1 bottom, 0 top
function Player:drawHUD (x,y,scale,elevation)
@@ -386,4 +391,4 @@ end
function Player:playSound(sfx)
local source = love.audio.newSource(self.sfx[sfx])
source:play()
-end \ No newline at end of file
+end