我正在尝试将http://www.raywenderlich.com/29460/collisions-and-collectables-how-to-make-a-tile-based-game-with-cocos2d-2-x-part-2教程转换为cocos2dx 并在这一行出现错误: CCString *collision = properties->objectForKey("Collidable");
void HelloWorld::setPlayerPosition(CCPoint position)
{
CCPoint tileCoord = this->tileCoordForPosition(position);
int tileGid = _meta->tileGIDAt(tileCoord);
if(tileGid)
{
CCDictionary *properties = _tileMap->propertiesForGID(tileGid);
if(properties)
{
CCString *collision = properties->objectForKey("Collidable");
if(collision && (collision->compare("True")))
return;
}
}
_player->setPosition(position);
}