PuzzleSDK
TileDemoNew类 参考

#include <TileMapTest2.h>

+ 类 TileDemoNew 继承关系图:
+ TileDemoNew 的协作图:

Public 成员函数

 TileDemoNew ()
 
virtual ~TileDemoNew ()
 
virtual std::string title () const override
 
virtual std::string subtitle () const override
 
virtual void onExit () override
 
void onTouchesMoved (const std::vector< cocos2d::Touch * > &touches, cocos2d::Event *event)
 
- Public 成员函数 继承自 TestCase
 TestCase ()
 
 ~TestCase ()
 
virtual Type getTestType () const
 
virtual float getDuration () const
 
virtual std::string getExpectedOutput () const
 
virtual std::string getActualOutput () const
 
virtual void restartTestCallback (cocos2d::Ref *sender)
 
virtual void nextTestCallback (cocos2d::Ref *sender)
 
virtual void priorTestCallback (cocos2d::Ref *sender)
 
virtual void onBackCallback (cocos2d::Ref *sender)
 
void setTestSuite (TestSuite *testSuite)
 
TestSuitegetTestSuite () const
 
float getRunTime () const
 
void setTestCaseName (const std::string &name)
 
std::string getTestCaseName () const
 
const cocos2d::Label * getSubtitleLable () const
 
const cocos2d::MenuItemImage * getRestartTestItem () const
 
virtual void onEnter () override
 

额外继承的成员函数

- Public 类型 继承自 TestCase
enum class  Type { ROBUSTNESS , UNIT , GRAPHICAL_STATIC , MANUAL }
 
- Public 属性 继承自 TestCase
CC_CONSTRUCTOR_ACCESS __pad0__: virtual bool init() override
 
- Protected 属性 继承自 TestCase
cocos2d::MenuItemImage * _priorTestItem
 
cocos2d::MenuItemImage * _restartTestItem
 
cocos2d::MenuItemImage * _nextTestItem
 
cocos2d::Label * _titleLabel
 
cocos2d::Label * _subtitleLabel
 

详细描述

在文件 TileMapTest2.h32 行定义.

构造及析构函数说明

◆ TileDemoNew()

TileDemoNew::TileDemoNew ( )

在文件 TileMapTest2.cpp71 行定义.

72{
73 // fix bug #486, #419.
74 // "test" is the default value in Director::setGLDefaultValues()
75 // but TransitionTest may setDepthTest(false), we should revert it here
76 Director::getInstance()->getRenderer()->setDepthTest(true);
77 Director::getInstance()->getRenderer()->setDepthWrite(true);
78
79 auto listener = EventListenerTouchAllAtOnce::create();
80 listener->onTouchesMoved = CC_CALLBACK_2(TileDemoNew::onTouchesMoved, this);
81 _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);
82}
void onTouchesMoved(const std::vector< cocos2d::Touch * > &touches, cocos2d::Event *event)

引用了 onTouchesMoved().

+ 函数调用图:

◆ ~TileDemoNew()

TileDemoNew::~TileDemoNew ( )
virtual

在文件 TileMapTest2.cpp84 行定义.

85{
86}

成员函数说明

◆ onExit()

void TileDemoNew::onExit ( )
overridevirtual

TMXOrthoTestNew, TMXIsoZorderNew, TMXIsoVertexZNew , 以及 TMXOrthoVertexZNew 重载.

在文件 TileMapTest2.cpp98 行定义.

99{
100 TestCase::onExit();
101 Director::getInstance()->getRenderer()->setDepthTest(false);
102 Director::getInstance()->getRenderer()->setDepthWrite(false);
103}

被这些函数引用 TMXOrthoTestNew::onExit(), TMXIsoZorderNew::onExit(), TMXIsoVertexZNew::onExit() , 以及 TMXOrthoVertexZNew::onExit().

+ 这是这个函数的调用关系图:

◆ onTouchesMoved()

void TileDemoNew::onTouchesMoved ( const std::vector< cocos2d::Touch * > &  touches,
cocos2d::Event *  event 
)

在文件 TileMapTest2.cpp105 行定义.

106{
107 auto touch = touches[0];
108
109 auto diff = touch->getDelta();
110 auto node = getChildByTag(kTagTileMap);
111 auto currentPos = node->getPosition();
112 node->setPosition(currentPos + diff);
113}
@ kTagTileMap

引用了 kTagTileMap.

被这些函数引用 TileDemoNew().

+ 这是这个函数的调用关系图:

◆ subtitle()

◆ title()


该类的文档由以下文件生成: