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);
}
cocos2dx-把触点坐标转换成TieldMap坐标
最新推荐文章于 2023-05-30 18:43:43 发布