cocos2d::CCPoint HelloWorld::covertPointToTiledCoord(cocos2d::CCPoint p)
{
	int x = p.x / mMap->getTileSize().width;
	int y = ((mMap->getMapSize().height * mMap->getTileSize().height) - p.y) / mMap->getTileSize().height;

	return ccp(x, y);
}

posted on 2013-03-17 15:16  纯洁的坏蛋  阅读(257)  评论(0编辑  收藏  举报