local Testmap2Scene = class("Testmap2Scene", function() return display.newScene("Testmap2Scene") end) function Testmap2Scene:ctor() self.map_=cc.TMXTiledMap:create("map/map3.tmx"); self:addChild(self.map_) local objectLayer=self.map_:getLayer("layer") --ok print(objectLayer:getTileGIDAt({x=0,y=0})) print(objectLayer:getTileGIDAt({x=1,y=0})) print(objectLayer:getTileGIDAt({x=2,y=0})) print(objectLayer:getTileGIDAt({x=0,y=1})) print(objectLayer:getTileGIDAt({x=1,y=1})) print(objectLayer:getTileGIDAt({x=2,y=1})) print(objectLayer:getTileGIDAt({x=0,y=2})) print(objectLayer:getTileGIDAt({x=1,y=2})) print(objectLayer:getTileGIDAt({x=2,y=2})) --unmatch print(objectLayer:getTileGIDAt({0,0})) print(objectLayer:getTileGIDAt({1,0})) print(objectLayer:getTileGIDAt({2,0})) print(objectLayer:getTileGIDAt({0,1})) print(objectLayer:getTileGIDAt({1,1})) print(objectLayer:getTileGIDAt({2,1})) print(objectLayer:getTileGIDAt({0,2})) print(objectLayer:getTileGIDAt({1,2})) print(objectLayer:getTileGIDAt({2,2})) --print(objectLayer:getTileGIDAt()) end function Testmap2Scene:loadLight() end return Testmap2Scene