local PlayerMap = Object:extend() function PlayerMap:initMap() self.previousMap = 0 end function PlayerMap:updateCurrentMap() local currentMap = self.world.map:getMapAtPoint(self.x, self.y) if (currentMap ~= nil) then if (self.previousMap ~= currentMap.id) then self.previousMap = currentMap.id self.scene:updateCurrentMap(currentMap) end end end return PlayerMap