summaryrefslogtreecommitdiffhomepage
path: root/player.lua
diff options
context:
space:
mode:
Diffstat (limited to 'player.lua')
-rw-r--r--player.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/player.lua b/player.lua
index 2a5d270..f22bff8 100644
--- a/player.lua
+++ b/player.lua
@@ -63,7 +63,7 @@ function Player:new (game, world, x, y, name)
o.body:setFixedRotation(true)
-- Misc
o.name = name or "empty"
- o.sprite = love.graphics.newImage("assets/"..o.name..".png")
+ o.sprite = newImage("assets/"..o.name..".png")
o.world = game
-- Animation
o.initial = o.delay
@@ -82,6 +82,7 @@ function Player:delete()
self.sprite = nil
end
+-- Controller
function Player:assignController(controller)
self.controller = controller or nil
controller:setParent(self)