标签:style blog color io os ar for sp div
CCTMXTiledMap *map=CCTMXTiledMap::create("1.tmx"); addChild(map); //fight juchi CCArray* pChildrenArray=map->getChildren(); CCSpriteBatchNode* child=NULL; CCObject* pObject=NULL; CCARRAY_FOREACH(pChildrenArray,pObject) { child=(CCSpriteBatchNode*)pObject; if(!child) { break; } child->getTexture()->setAntiAliasTexParameters(); } CCTMXLayer* layer=map->layerNamed("Layer 0"); CCSize s=layer->getLayerSize(); CCPoint playerIndex=ccp(0,1); int tilegid=layer->tileGIDAt(playerIndex); if(tilegid>0) { CCDictionary *tiledic=(CCDictionary*)map->propertiesForGID(tilegid); CCString *mvalue=(CCString*) tiledic->objectForKey("collion"); int mv=mvalue->floatValue(); CCLOG("%d",mv); }
标签:style blog color io os ar for sp div
原文地址:http://www.cnblogs.com/yufenghou/p/4005958.html