]> Untitled Git - lightcycles-love.git/blobdiff - player.lua
Added player names and stub for collision detection
[lightcycles-love.git] / player.lua
index 387b54f303c8bdd7f1a79afb9934ffbd0fa63d6f..ed4f2106adb72c53de5f168649db5ffb72a24984 100644 (file)
@@ -1,7 +1,7 @@
 require 'vec2'
 
 Player = {}
-Player.name = 'player'
+Player.name = 'none'
 Player.color = {255, 0, 0}
 Player.width = 5
 Player.height = 5
@@ -30,6 +30,10 @@ function Player:new(o)
     return o
 end
 
+function Player:__tostring()
+    return self.name
+end
+
 function Player:drawPath()
     if #self.path >= 4 then
         love.graphics.setLineWidth(2)