PuzzleSDK
ActionRotationalSkewVSStandardSkew类 参考

#include <ActionsTest.h>

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

Public 成员函数

 CREATE_FUNC (ActionRotationalSkewVSStandardSkew)
 
virtual void onEnter () override
 
virtual std::string subtitle () const override
 
- Public 成员函数 继承自 ActionsDemo
virtual void onExit () override
 
void centerSprites (unsigned int numberOfSprites)
 
void alignSpritesLeft (unsigned int numberOfSprites)
 
virtual std::string title () const override
 
- 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.h94 行定义.

成员函数说明

◆ CREATE_FUNC()

ActionRotationalSkewVSStandardSkew::CREATE_FUNC ( ActionRotationalSkewVSStandardSkew  )

◆ onEnter()

void ActionRotationalSkewVSStandardSkew::onEnter ( )
overridevirtual

重载 ActionsDemo .

在文件 ActionsTest.cpp329 行定义.

330{
332
333 _tamara->removeFromParentAndCleanup(true);
334 _grossini->removeFromParentAndCleanup(true);
335 _kathia->removeFromParentAndCleanup(true);
336
337 auto s = Director::getInstance()->getWinSize();
338
339 Size boxSize(100.0f, 100.0f);
340
341 auto box = LayerColor::create(Color4B(255,255,0,255));
342 box->setAnchorPoint(Vec2(0.5f,0.5f));
343 box->setContentSize( boxSize );
344 box->setIgnoreAnchorPointForPosition(false);
345 box->setPosition(s.width/2, s.height - 100 - box->getContentSize().height/2);
346 this->addChild(box);
347
348 auto label = Label::createWithTTF("Standard cocos2d Skew", "fonts/Marker Felt.ttf", 16.0f);
349 label->setPosition(s.width/2, s.height - 100 + label->getContentSize().height);
350 this->addChild(label);
351
352 auto actionTo = SkewBy::create(2, 360, 0);
353 auto actionToBack = SkewBy::create(2, -360, 0);
354
355 box->runAction(Sequence::create(actionTo, actionToBack, nullptr));
356
357 box = LayerColor::create(Color4B(255,255,0,255));
358 box->setAnchorPoint(Vec2(0.5f,0.5f));
359 box->setContentSize(boxSize);
360 box->setIgnoreAnchorPointForPosition(false);
361 box->setPosition(s.width/2, s.height - 250 - box->getContentSize().height/2);
362 this->addChild(box);
363
364 label = Label::createWithTTF("Rotational Skew", "fonts/Marker Felt.ttf", 16.0f);
365 label->setPosition(s.width/2, s.height - 250 + label->getContentSize().height/2);
366 this->addChild(label);
367 auto actionTo2 = RotateBy::create(2, 360, 0);
368 auto actionToBack2 = RotateBy::create(2, -360, 0);
369 box->runAction(Sequence::create(actionTo2, actionToBack2, nullptr));
370}
cocos2d::Sprite * _grossini
Definition: ActionsTest.h:37
virtual void onEnter() override
cocos2d::Sprite * _tamara
Definition: ActionsTest.h:38
cocos2d::Sprite * _kathia
Definition: ActionsTest.h:39

引用了 ActionsDemo::_grossini, ActionsDemo::_kathia, ActionsDemo::_tamara , 以及 ActionsDemo::onEnter().

+ 函数调用图:

◆ subtitle()

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

重载 TestCase .

在文件 ActionsTest.cpp371 行定义.

372{
373 return "Skew Comparison";
374}

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