26#include "../testResource.h"
28#include "2d/CCFastTMXLayer.h"
29#include "2d/CCFastTMXTiledMap.h"
38FastTileMapTests::FastTileMapTests()
76 Director::getInstance()->getRenderer()->setDepthTest(
true);
77 Director::getInstance()->getRenderer()->setDepthWrite(
true);
79 auto listener = EventListenerTouchAllAtOnce::create();
81 _eventDispatcher->addEventListenerWithSceneGraphPriority(listener,
this);
95 return "drag the screen";
101 Director::getInstance()->getRenderer()->setDepthTest(
false);
102 Director::getInstance()->getRenderer()->setDepthWrite(
false);
107 auto touch = touches[0];
109 auto diff = touch->getDelta();
111 auto currentPos = node->getPosition();
112 node->setPosition(currentPos + diff);
124 map->getTexture()->setAntiAliasTexParameters();
126 Size CC_UNUSED s = map->getContentSize();
127 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
135 map->setAnchorPoint( Vec2(0.0f, 0.5f) );
137 auto scale = ScaleBy::create(4, 0.8f);
138 auto scaleBack = scale->reverse();
140 auto seq = Sequence::create(scale, scaleBack,
nullptr);
142 map->runAction(RepeatForever::create(seq));
147 return "TileMapAtlas";
159 map->getTexture()->setAliasTexParameters();
161 Size CC_UNUSED s = map->getContentSize();
162 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
171 map->setAnchorPoint( Vec2(0, 0) );
172 map->setPosition( Vec2(-20,-200) );
181 auto tilemap = (TileMapAtlas*) getChildByTag(
kTagTileMap);
197 Color3B c = tilemap->getTileAt(Vec2(13,21));
204 tilemap->setTile(c, Vec2(13,21) );
209 return "Editable TileMapAtlas";
227 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/orthogonal-test2.tmx");
231 Size CC_UNUSED s = map->getContentSize();
232 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
234 auto scale = ScaleBy::create(10, 0.1f);
235 auto back = scale->reverse();
236 auto seq = Sequence::create(scale, back,
nullptr);
237 auto repeat = RepeatForever::create(seq);
238 map->runAction(repeat);
249 Director::getInstance()->setProjection(Director::Projection::_3D);
254 Director::getInstance()->setProjection(Director::Projection::DEFAULT);
260 return "TMX Orthogonal test";
270 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/orthogonal-test1.tmx");
273 Size CC_UNUSED s = map->getContentSize();
274 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
276 map->runAction( ScaleBy::create(2, 0.5f) ) ;
281 return "TMX Ortho test2";
291 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/orthogonal-test3.tmx");
294 Size CC_UNUSED s = map->getContentSize();
295 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
298 map->setAnchorPoint( Vec2(0.5f, 0.5f) );
303 return "TMX anchorPoint test";
313 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/orthogonal-test4.tmx");
316 Size CC_UNUSED s1 = map->getContentSize();
317 CCLOG(
"ContentSize: %f, %f", s1.width,s1.height);
319 map->setAnchorPoint(Vec2(0.0f, 0.0f));
321 auto layer = map->getLayer(
"Layer 0");
322 auto s = layer->getLayerSize();
325 sprite = layer->getTileAt(Vec2(0.0f,0.0f));
327 sprite = layer->getTileAt(Vec2(s.width-1,0.0f));
329 sprite = layer->getTileAt(Vec2(0.0f,s.height-1));
331 sprite = layer->getTileAt(Vec2(s.width-1,s.height-1));
342 auto map =
static_cast<cocos2d::FastTMXTiledMap*
>( getChildByTag(
kTagTileMap) );
343 auto layer = map->getLayer(
"Layer 0");
344 auto s = layer->getLayerSize();
346 auto sprite = layer->getTileAt( Vec2(s.width-1,0.0f) );
347 auto sprite2 = layer->getTileAt(Vec2(s.width-1, s.height-1));
348 layer->removeChild(sprite,
true);
349 auto sprite3 = layer->getTileAt(Vec2(2.0f, s.height-1));
350 layer->removeChild(sprite3,
true);
351 layer->removeChild(sprite2,
true);
356 return "TMX width/height test";
375 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/orthogonal-test2.tmx");
378 Size CC_UNUSED s = map->getContentSize();
379 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
382 auto layer = map->getLayer(
"Layer 0");
386 auto tile0 = layer->getTileAt(Vec2(1,63));
387 auto tile1 = layer->getTileAt(Vec2(2,63));
388 auto tile2 = layer->getTileAt(Vec2(3,62));
389 auto tile3 = layer->getTileAt(Vec2(2,62));
390 tile0->setAnchorPoint( Vec2(0.5f, 0.5f) );
391 tile1->setAnchorPoint( Vec2(0.5f, 0.5f) );
392 tile2->setAnchorPoint( Vec2(0.5f, 0.5f) );
393 tile3->setAnchorPoint( Vec2(0.5f, 0.5f) );
395 auto move = MoveBy::create(0.5f, Vec2(0.0f,160.0f));
396 auto rotate = RotateBy::create(2, 360);
397 auto scale = ScaleBy::create(2, 5);
398 auto opacity = FadeOut::create(2);
399 auto fadein = FadeIn::create(2);
400 auto scaleback = ScaleTo::create(1, 1);
402 auto seq0 = Sequence::create(move, rotate, scale, opacity, fadein, scaleback, finish,
nullptr);
403 auto seq1 = seq0->clone();
404 auto seq2 = seq0->clone();
405 auto seq3 = seq0->clone();
407 tile0->runAction(seq0);
408 tile1->runAction(seq1);
409 tile2->runAction(seq2);
410 tile3->runAction(seq3);
413 _gid = layer->getTileGIDAt(Vec2(0,63));
429 auto p = ((Node*)sender)->getParent();
433 p->removeChild((Node*)sender,
true);
441 auto map = (cocos2d::FastTMXTiledMap*)getChildByTag(
kTagTileMap);
442 auto layer = (cocos2d::FastTMXLayer*)map->getChildByTag(0);
448 auto s = layer->getLayerSize();
450 for(
int y=0; y< s.height; y++ )
452 layer->setTileGID(
_gid2, Vec2((
float)3, (float)y));
462 auto map = (cocos2d::FastTMXTiledMap*)getChildByTag(
kTagTileMap);
463 auto layer = (cocos2d::FastTMXLayer*)map->getChildByTag(0);
465 auto s = layer->getLayerSize();
466 for(
int x=0; x<s.width;x++)
468 int y = (int)s.height-1;
469 unsigned int tmpgid = layer->getTileGIDAt( Vec2((
float)x, (float)y) );
470 layer->setTileGID(tmpgid+1, Vec2((
float)x, (float)y));
478 auto map = (cocos2d::FastTMXTiledMap*)getChildByTag(
kTagTileMap);
479 auto layer = (cocos2d::FastTMXLayer*)map->getChildByTag(0);
480 auto s = layer->getLayerSize();
482 for(
int y=0; y< s.height; y++ )
484 layer->removeTileAt( Vec2(5.0, (
float)y) );
492 return "TMX Read/Write test";
502 auto color = LayerColor::create( Color4B(64,64,64,255) );
505 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/hexa-test.tmx");
508 Size CC_UNUSED s = map->getContentSize();
509 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
514 return "TMX Hex tes";
524 auto color = LayerColor::create( Color4B(64,64,64,255) );
527 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/iso-test.tmx");
531 auto ms = map->getMapSize();
532 auto ts = map->getTileSize();
533 map->runAction( MoveTo::create(1.0f, Vec2( -ms.width * ts.width/2, -ms.height * ts.height/2 )) );
538 return "TMX Isometric test 0";
548 auto color = LayerColor::create( Color4B(64,64,64,255) );
551 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/iso-test1.tmx");
554 Size CC_UNUSED s = map->getContentSize();
555 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
557 map->setAnchorPoint(Vec2(0.5f, 0.5f));
562 return "TMX Isometric test + anchorPoint";
572 auto color = LayerColor::create( Color4B(64,64,64,255) );
575 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/iso-test2.tmx");
578 Size CC_UNUSED s = map->getContentSize();
579 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
582 auto ms = map->getMapSize();
583 auto ts = map->getTileSize();
584 map->runAction( MoveTo::create(1.0f, Vec2( -ms.width * ts.width/2, -ms.height * ts.height/2 ) ));
589 return "TMX Isometric test 2";
599 auto color = LayerColor::create( Color4B(64,64,64,255) );
602 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/iso-test2-uncompressed.tmx");
605 Size CC_UNUSED s = map->getContentSize();
606 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
609 auto ms = map->getMapSize();
610 auto ts = map->getTileSize();
611 map->runAction(MoveTo::create(1.0f, Vec2( -ms.width * ts.width/2, -ms.height * ts.height/2 ) ));
627 return "TMX Uncompressed test";
637 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/orthogonal-test5.tmx");
640 Size CC_UNUSED s = map->getContentSize();
641 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
646 return "TMX Tileset test";
656 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/ortho-objects.tmx");
659 Size CC_UNUSED s = map->getContentSize();
660 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
662 auto group = map->getObjectGroup(
"Object Group 1");
663 auto& objects = group->getObjects();
665 Value objectsVal = Value(objects);
666 CCLOG(
"%s", objectsVal.getDescription().c_str());
668 auto drawNode = DrawNode::create();
669 Color4F color(1.0, 1.0, 1.0, 1.0);
670 for (
auto& obj : objects)
672 ValueMap& dict = obj.asValueMap();
674 float x = dict[
"x"].asFloat();
675 float y = dict[
"y"].asFloat();
676 float width = dict[
"width"].asFloat();
677 float height = dict[
"height"].asFloat();
679 drawNode->drawLine(Vec2(x, y), Vec2(x + width, y), color);
680 drawNode->drawLine(Vec2(x + width, y), Vec2(x + width, y + height), color);
681 drawNode->drawLine(Vec2(x + width,y + height), Vec2(x,y + height), color);
682 drawNode->drawLine(Vec2(x,y + height), Vec2(x,y), color);
684 map->addChild(drawNode);
689 return "TMX Ortho object test";
694 return "You should see a white box around the 3 platforms";
706 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/iso-test-objectgroup.tmx");
709 Size CC_UNUSED s = map->getContentSize();
710 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
712 auto group = map->getObjectGroup(
"Object Group 1");
714 auto& objects = group->getObjects();
716 Value objectsVal = Value(objects);
717 CCLOG(
"%s", objectsVal.getDescription().c_str());
719 auto drawNode = DrawNode::create();
720 Color4F color(1.0, 1.0, 1.0, 1.0);
721 for (
auto& obj : objects)
723 ValueMap& dict = obj.asValueMap();
725 float x = dict[
"x"].asFloat();
726 float y = dict[
"y"].asFloat();
727 float width = dict[
"width"].asFloat();
728 float height = dict[
"height"].asFloat();
730 drawNode->drawLine(Vec2(x, y), Vec2(x + width, y), color);
731 drawNode->drawLine(Vec2(x + width, y), Vec2(x + width, y + height), color);
732 drawNode->drawLine(Vec2(x + width,y + height), Vec2(x,y + height), color);
733 drawNode->drawLine(Vec2(x,y + height), Vec2(x,y), color);
735 map->addChild(drawNode, 10);
740 return "TMX Iso object test";
745 return "You need to parse them manually. See bug #810";
757 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/orthogonal-test5.tmx");
760 Size CC_UNUSED s = map->getContentSize();
761 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
763 cocos2d::FastTMXLayer* layer;
764 layer = map->getLayer(
"Layer 0");
766 auto ls = layer->getLayerSize();
767 for (
unsigned int y = 0; y < ls.height; y++)
769 for (
unsigned int x = 0; x < ls.width; x++)
771 layer->setTileGID(1, Vec2((
float)x, (
float)y ) );
778 return "TMX resize test";
783 return "Should not crash. Testing issue #740";
794 Director::getInstance()->getRenderer()->setDepthTest(
false);
795 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/iso-test-zorder.tmx");
798 auto s = map->getContentSize();
799 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
800 map->setPosition(Vec2(-s.width/2,0.0f));
803 map->addChild(
_tamara, (
int)map->getChildren().size() );
805 int mapWidth = map->getMapSize().width * map->getTileSize().width;
806 _tamara->setPosition(CC_POINT_PIXELS_TO_POINTS(Vec2( mapWidth/2.0f,0.0f)));
807 _tamara->setAnchorPoint(Vec2(0.5f,0.0f));
810 auto move = MoveBy::create(10, Vec2(300.0f,250.0f));
811 auto back = move->reverse();
812 auto seq = Sequence::create(move, back,
nullptr);
813 _tamara->runAction( RepeatForever::create(seq) );
831 auto p =
_tamara->getPosition();
832 p = CC_POINT_POINTS_TO_PIXELS(p);
840 int newZ = 4 - (p.y / 48);
841 newZ = std::max(newZ,0);
843 map->reorderChild(
_tamara, newZ);
848 return "TMX Iso Zorder";
853 return "Sprite should hide behind the trees";
864 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/orthogonal-test-zorder.tmx");
867 Size CC_UNUSED s = map->getContentSize();
868 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
871 map->addChild(
_tamara, (
int)map->getChildren().size());
873 _tamara->setAnchorPoint(Vec2(0.5f,0.0f));
876 auto move = MoveBy::create(10, Vec2(400.0f,450.0f));
877 auto back = move->reverse();
878 auto seq = Sequence::create(move, back,
nullptr);
879 _tamara->runAction( RepeatForever::create(seq));
891 auto p =
_tamara->getPosition();
892 p = CC_POINT_POINTS_TO_PIXELS(p);
901 int newZ = 4 - ( (p.y-10) / 81);
902 newZ = std::max(newZ,0);
904 map->reorderChild(
_tamara, newZ);
909 return "TMX Ortho Zorder";
914 return "Sprite should hide behind the trees";
925 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/iso-test-vertexz.tmx");
928 auto s = map->getContentSize();
929 map->setPosition( Vec2(-s.width/2,0.0f) );
930 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
934 auto layer = map->getLayer(
"Trees");
935 _tamara = layer->getTileAt( Vec2(29.0f,29.0f) );
938 auto move = MoveBy::create(10, Vec2(300,250) * (1/CC_CONTENT_SCALE_FACTOR()));
939 auto back = move->reverse();
940 auto seq = Sequence::create(move, back,
nullptr);
941 _tamara->runAction( RepeatForever::create(seq) );
956 auto p =
_tamara->getPosition();
957 p = CC_POINT_POINTS_TO_PIXELS(p);
958 float newZ = -(p.y+32) /16;
967 Director::getInstance()->setProjection(Director::Projection::_2D);
968 Director::getInstance()->getRenderer()->setDepthTest(
true);
969 Director::getInstance()->getRenderer()->setDepthWrite(
true);
975 Director::getInstance()->setProjection(Director::Projection::DEFAULT);
976 Director::getInstance()->getRenderer()->setDepthTest(
false);
977 Director::getInstance()->getRenderer()->setDepthWrite(
false);
983 return "TMX Iso VertexZ";
988 return "Doesn't support yet";
999 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/orthogonal-test-vertexz.tmx");
1002 Size CC_UNUSED s = map->getContentSize();
1003 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
1007 auto layer = map->getLayer(
"trees");
1008 _tamara = layer->getTileAt(Vec2(0,11));
1012 auto move = MoveBy::create(10, Vec2(400,450) * (1/CC_CONTENT_SCALE_FACTOR()));
1013 auto back = move->reverse();
1014 auto seq = Sequence::create(move, back,
nullptr);
1015 _tamara->runAction( RepeatForever::create(seq));
1030 auto p =
_tamara->getPosition();
1031 p = CC_POINT_POINTS_TO_PIXELS(p);
1032 _tamara->setPositionZ( -( (p.y+81) /81) );
1040 Director::getInstance()->setProjection(Director::Projection::_2D);
1041 Director::getInstance()->getRenderer()->setDepthTest(
true);
1042 Director::getInstance()->getRenderer()->setDepthWrite(
true);
1048 Director::getInstance()->setProjection(Director::Projection::DEFAULT);
1049 Director::getInstance()->getRenderer()->setDepthTest(
false);
1050 Director::getInstance()->getRenderer()->setDepthWrite(
false);
1056 return "TMX Ortho vertexZ";
1061 return "Doesn't support yet";
1072 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/iso-test-movelayer.tmx");
1075 map->setPosition(Vec2(-700.0f,-50.0f));
1077 Size CC_UNUSED s = map->getContentSize();
1078 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
1083 return "TMX Iso Move Layer";
1088 return "Trees should be horizontally aligned";
1099 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/orthogonal-test-movelayer.tmx");
1102 Size CC_UNUSED s = map->getContentSize();
1103 CCLOG(
"ContentSize: %f, %f", s.width,s.height);
1108 return "TMX Ortho Move Layer";
1113 return "Trees should be horizontally aligned";
1124 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/ortho-tile-property.tmx");
1127 for(
int i=1;i<=20;i++){
1128 for(
const auto& value : map->getPropertiesForGID(i).asValueMap())
1130 log(
"GID:%i, Properties:%s, %s", i, value.first.c_str(), value.second.asString().c_str());
1137 return "TMX Tile Property Test";
1142 return "In the console you should see tile properties";
1153 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/ortho-rotation-test.tmx");
1156 Size CC_UNUSED s = map->getContentSize();
1157 log(
"ContentSize: %f, %f", s.width,s.height);
1159 auto action = ScaleBy::create(2, 0.5f);
1160 map->runAction(action);
1165 return "TMX tile flip test";
1176 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/ortho-rotation-test.tmx");
1179 auto s = map->getContentSize();
1180 log(
"ContentSize: %f, %f", s.width,s.height);
1182 auto action = ScaleBy::create(2, 0.5f);
1183 map->runAction(action);
1190 return "TMX tile flip run time test";
1195 return "in 2 sec bottom left tiles will flip";
1200 auto map = (cocos2d::FastTMXTiledMap*) getChildByTag(
kTagTileMap);
1201 auto layer = map->getLayer(
"Layer 0");
1204 auto tileCoord = Vec2(1,10);
1206 unsigned int GID = layer->getTileGIDAt(tileCoord, (TMXTileFlags*)&flags);
1208 if( flags & kTMXTileVerticalFlag )
1209 flags &= ~kTMXTileVerticalFlag;
1211 flags |= kTMXTileVerticalFlag;
1212 layer->setTileGID(GID ,tileCoord, (TMXTileFlags)flags);
1215 tileCoord = Vec2(1,8);
1216 GID = layer->getTileGIDAt(tileCoord, (TMXTileFlags*)&flags);
1218 if( flags & kTMXTileVerticalFlag )
1219 flags &= ~kTMXTileVerticalFlag;
1221 flags |= kTMXTileVerticalFlag;
1222 layer->setTileGID(GID ,tileCoord, (TMXTileFlags)flags);
1225 tileCoord = Vec2(2,8);
1226 GID = layer->getTileGIDAt(tileCoord, (TMXTileFlags*)&flags);
1228 if( flags & kTMXTileHorizontalFlag )
1229 flags &= ~kTMXTileHorizontalFlag;
1231 flags |= kTMXTileHorizontalFlag;
1232 layer->setTileGID(GID, tileCoord, (TMXTileFlags)flags);
1242 std::string resources =
"TileMaps";
1243 std::string file = resources +
"/orthogonal-test1.tmx";
1245 auto fileUtils = FileUtils::getInstance();
1246 std::string str = fileUtils->getStringFromFile(fileUtils->fullPathForFilename(file.c_str()));
1248 auto map = cocos2d::FastTMXTiledMap::createWithXML(str ,resources.c_str());
1251 auto s = map->getContentSize();
1252 log(
"ContentSize: %f, %f", s.width,s.height);
1254 auto action = ScaleBy::create(2, 0.5f);
1255 map->runAction(action);
1260 return "TMX created from XML test";
1274 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/xml-test.tmx");
1277 auto s = map->getContentSize();
1278 log(
"ContentSize: %f, %f", s.width,s.height);
1280 for(
int i=24;i<=26;i++){
1281 log(
"GID:%i, Properties:%s", i, map->getPropertiesForGID(i).asValueMap()[
"name"].asString().c_str());
1284 auto action = ScaleBy::create(2, 0.5f);
1285 map->runAction(action);
1290 return "you should see blue, green and yellow in console.";
1300 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/orthogonal-test6.tmx");
1303 Size CC_UNUSED s1 = map->getContentSize();
1304 CCLOG(
"ContentSize: %f, %f", s1.width,s1.height);
1306 map->setAnchorPoint(Vec2(0.0f, 0.0f));
1307 auto layer = map->getLayer(
"Tile Layer 1");
1308 layer->setTileGID(3, Vec2(2,2));
1313 return "TMX Bug 987";
1318 return "You should see an square";
1328 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/iso-test-bug787.tmx");
1331 map->setScale(0.25f);
1336 return "TMX Bug 787";
1341 return "You should see a map";
1351 auto map = cocos2d::FastTMXTiledMap::create(
"TileMaps/test-object-layer.tmx");
1354 Size CC_UNUSED s = map->getContentSize();
1355 CCLOG(
"Contentsize: %f, %f", s.width, s.height);
1357 CCLOG(
"----> Iterating over all the group objects");
1359 auto drawNode = DrawNode::create();
1360 Color4F color(1.0, 1.0, 1.0, 1.0);
1361 auto group = map->getObjectGroup(
"Object Layer 1");
1362 auto objects = group->getObjects();
1363 for (
auto& obj : objects)
1365 ValueMap& dict = obj.asValueMap();
1367 float x = dict[
"x"].asFloat();
1368 float y = dict[
"y"].asFloat();
1369 float width = dict[
"width"].asFloat();
1370 float height = dict[
"height"].asFloat();
1372 drawNode->drawLine(Vec2(x, y), Vec2(x + width, y), color);
1373 drawNode->drawLine(Vec2(x + width, y), Vec2(x + width, y + height), color);
1374 drawNode->drawLine(Vec2(x + width,y + height), Vec2(x,y + height), color);
1375 drawNode->drawLine(Vec2(x,y + height), Vec2(x,y), color);
1377 map->addChild(drawNode, 10);
1382 return "TMX GID objects";
1387 return "Tiles are created from an object group";
#define ADD_TEST_CASE(__className__)
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string title() const override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string title() const override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string title() const override
virtual std::string title() const override
virtual std::string title() const override
void repositionSprite(float dt)
virtual void onEnter() override
cocos2d::Sprite * _tamara
virtual void onExit() override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string subtitle() const override
void repositionSprite(float dt)
cocos2d::Sprite * _tamara
virtual void onExit() override
TMXOrthoFlipRunTimeTestNew()
virtual std::string title() const override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string title() const override
virtual std::string title() const override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string title() const override
void removeSprite(float dt)
virtual std::string title() const override
virtual std::string title() const override
virtual void onExit() override
virtual void onEnter() override
virtual std::string title() const override
void repositionSprite(float dt)
virtual std::string subtitle() const override
cocos2d::Sprite * _tamara
virtual void onEnter() override
virtual void onExit() override
virtual ~TMXOrthoZorderNew()
void repositionSprite(float dt)
virtual std::string subtitle() const override
virtual std::string title() const override
cocos2d::Sprite * _tamara
void removeTiles(float dt)
void repaintWithGID(float dt)
virtual std::string title() const override
void removeSprite(Node *sender)
virtual std::string title() const override
virtual std::string subtitle() const override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string title() const override
virtual std::string title() const override
virtual void onEnter() override
virtual void onExit() override
virtual std::string title() const override
virtual std::string subtitle() const override
void onTouchesMoved(const std::vector< cocos2d::Touch * > &touches, cocos2d::Event *event)
virtual std::string title() const override
virtual std::string title() const override
static const char s_TilesPng[]
static const char s_LevelMapTga[]
static const char s_pathSister1[]