#include <TileMapTest2.h>
◆ TMXIsoZorderNew()
| TMXIsoZorderNew::TMXIsoZorderNew |
( |
| ) |
|
在文件 TileMapTest2.cpp 第 792 行定义.
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) );
void repositionSprite(float dt)
cocos2d::Sprite * _tamara
static const char s_pathSister1[]
引用了 _tamara, kTagTileMap, repositionSprite() , 以及 s_pathSister1.
◆ ~TMXIsoZorderNew()
| TMXIsoZorderNew::~TMXIsoZorderNew |
( |
| ) |
|
◆ CREATE_FUNC()
◆ onExit()
| void TMXIsoZorderNew::onExit |
( |
| ) |
|
|
overridevirtual |
◆ repositionSprite()
| void TMXIsoZorderNew::repositionSprite |
( |
float |
dt | ) |
|
◆ subtitle()
| std::string TMXIsoZorderNew::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string TMXIsoZorderNew::title |
( |
| ) |
const |
|
overridevirtual |
◆ _tamara
| cocos2d::Sprite* TMXIsoZorderNew::_tamara |
|
private |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/TileMapTest/TileMapTest2.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/TileMapTest/TileMapTest2.cpp