PuzzleSDK
Issue1305_2类 参考

#include <ActionsTest.h>

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

Public 成员函数

 CREATE_FUNC (Issue1305_2)
 
virtual void onEnter () override
 
void printLog1 ()
 
void printLog2 ()
 
void printLog3 ()
 
void printLog4 ()
 
virtual std::string title () const override
 
virtual std::string subtitle () const override
 
- Public 成员函数 继承自 ActionsDemo
virtual void onExit () override
 
void centerSprites (unsigned int numberOfSprites)
 
void alignSpritesLeft (unsigned int numberOfSprites)
 
- 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
 

额外继承的成员函数

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

详细描述

在文件 ActionsTest.h473 行定义.

成员函数说明

◆ CREATE_FUNC()

Issue1305_2::CREATE_FUNC ( Issue1305_2  )

◆ onEnter()

void Issue1305_2::onEnter ( )
overridevirtual

重载 ActionsDemo .

在文件 ActionsTest.cpp1772 行定义.

1773{
1775 centerSprites(0);
1776
1777 auto spr = Sprite::create("Images/grossini.png");
1778 spr->setPosition(200,200);
1779 addChild(spr);
1780
1781 auto act1 = MoveBy::create(2 ,Vec2(0.0f, 100.0f));
1782 /* c++ can't support block, so we use CallFuncN instead.
1783 id act2 = [CallBlock actionWithBlock:^{
1784 NSLog(@"1st block");
1785 });
1786 id act3 = [MoveBy create:2, Vec2(0, -100));
1787 id act4 = [CallBlock actionWithBlock:^{
1788 NSLog(@"2nd block");
1789 });
1790 id act5 = [MoveBy create:2, Vec2(100, -100));
1791 id act6 = [CallBlock actionWithBlock:^{
1792 NSLog(@"3rd block");
1793 });
1794 id act7 = [MoveBy create:2, Vec2(-100, 0));
1795 id act8 = [CallBlock actionWithBlock:^{
1796 NSLog(@"4th block");
1797 });
1798 */
1799
1800 auto act2 = CallFunc::create( std::bind( &Issue1305_2::printLog1, this));
1801 auto act3 = MoveBy::create(2, Vec2(0.0f, -100.0f));
1802 auto act4 = CallFunc::create( std::bind( &Issue1305_2::printLog2, this));
1803 auto act5 = MoveBy::create(2, Vec2(100.0f, -100.0f));
1804 auto act6 = CallFunc::create( std::bind( &Issue1305_2::printLog3, this));
1805 auto act7 = MoveBy::create(2, Vec2(-100.0f, 0.0f));
1806 auto act8 = CallFunc::create( std::bind( &Issue1305_2::printLog4, this));
1807
1808 auto actF = Sequence::create(act1, act2, act3, act4, act5, act6, act7, act8, nullptr);
1809
1810 // [spr runAction:actF);
1811 Director::getInstance()->getActionManager()->addAction(actF ,spr, false);
1812
1813}
void centerSprites(unsigned int numberOfSprites)
virtual void onEnter() override
void printLog2()
void printLog3()
void printLog4()
void printLog1()

引用了 ActionsDemo::centerSprites(), ActionsDemo::onEnter(), printLog1(), printLog2(), printLog3() , 以及 printLog4().

+ 函数调用图:

◆ printLog1()

void Issue1305_2::printLog1 ( )

在文件 ActionsTest.cpp1815 行定义.

1816{
1817 log("1st block");
1818}

被这些函数引用 onEnter().

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

◆ printLog2()

void Issue1305_2::printLog2 ( )

在文件 ActionsTest.cpp1820 行定义.

1821{
1822 log("2nd block");
1823}

被这些函数引用 onEnter().

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

◆ printLog3()

void Issue1305_2::printLog3 ( )

在文件 ActionsTest.cpp1825 行定义.

1826{
1827 log("3rd block");
1828}

被这些函数引用 onEnter().

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

◆ printLog4()

void Issue1305_2::printLog4 ( )

在文件 ActionsTest.cpp1830 行定义.

1831{
1832 log("4th block");
1833}

被这些函数引用 onEnter().

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

◆ subtitle()

std::string Issue1305_2::subtitle ( ) const
overridevirtual

重载 TestCase .

在文件 ActionsTest.cpp1840 行定义.

1841{
1842 return "See console. You should only see one message for each block";
1843}

◆ title()

std::string Issue1305_2::title ( ) const
overridevirtual

重载 ActionsDemo .

在文件 ActionsTest.cpp1835 行定义.

1836{
1837 return "Issue 1305 #2";
1838}

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