Cursor = Tile:extend { image = 'data/cursor.png', onUpdate = function(self) if the.keys:justPressed('t') then self.image = 'data/cursor-target.png' end if the.keys:justPressed('c') then self.image = 'data/cursor.png' end end, onEndFrame = function(self) self.x = love.mouse.getX() + 8 + the.player.x - 400 self.y = love.mouse.getY() + 8 + the.player.y - 300 end }