#include <NewRendererTest.h>
◆ NonBatchSprites()
| NonBatchSprites::NonBatchSprites |
( |
| ) |
|
|
protected |
◆ ~NonBatchSprites()
| NonBatchSprites::~NonBatchSprites |
( |
| ) |
|
|
protectedvirtual |
◆ CREATE_FUNC()
◆ createSprite()
| void NonBatchSprites::createSprite |
( |
| ) |
|
|
protected |
在文件 NewRendererTest.cpp 第 1015 行定义.
1018 Size s = Director::getInstance()->getWinSize();
1019 Sprite* sprite =
nullptr;
1022 sprite = Sprite::create(
"Images/grossini_dance_05.png");
1026 sprite = Sprite::create(
"Images/grossini_dance_01.png");
1029 if (!sprite)
return;
1030 auto r = rand_0_1() * 0.6 + 0.2;
1031 sprite->setScale(r, r);
1032 float x = ((float)std::rand()) / RAND_MAX;
1033 float y = ((float)std::rand()) / RAND_MAX;
1034 sprite->runAction(RepeatForever::create(RotateBy::create(1, 45)));
1036 sprite->setPosition(Vec2(x * s.width, y * s.height));
1040 std::stringstream ss;
引用了 _spriteIndex, _spritesAnchor , 以及 _totalSprites.
被这些函数引用 update().
◆ subtitle()
| std::string NonBatchSprites::subtitle |
( |
| ) |
const |
|
overridevirtual |
重载 MultiSceneTest .
在文件 NewRendererTest.cpp 第 1095 行定义.
1097#if defined(COCOS2D_DEBUG) && COCOS2D_DEBUG == 1
1098 return "DEBUG: simulate lots of sprites, drop to 30 fps";
1100 return "RELEASE: simulate lots of sprites, drop to 30 fps";
◆ title()
| std::string NonBatchSprites::title |
( |
| ) |
const |
|
overridevirtual |
◆ update()
| void NonBatchSprites::update |
( |
float |
dt | ) |
|
|
overridevirtual |
在文件 NewRendererTest.cpp 第 1045 行定义.
1048 if( dt <= 1.0f / 28.0f && dt >= 1.0f/ 31.0f)
1065 delta =std::min(20, std::max(1, delta));
1066 for(
int i =0 ;i< delta; i++) {
1078 std::stringstream ss;
const float DEST_DT_30FPS
引用了 _around30fps, _contFast, _contSlow, _maDt, _rmaDt, _spriteIndex, _totalSprites, NonBatchSprites::Ticker::cancel(), createSprite(), DEST_DT_30FPS, NonBatchSprites::Ticker::hit() , 以及 NonBatchSprites::Ticker::ok().
◆ _around30fps
◆ _contFast
◆ _contSlow
◆ _maDt
| float NonBatchSprites::_maDt = 1.0f / 60.0f |
|
protected |
◆ _rmaDt
| float NonBatchSprites::_rmaDt = 1.0f/ 60.0f |
|
protected |
◆ _spriteIndex
| int NonBatchSprites::_spriteIndex = 0 |
|
protected |
◆ _spritesAnchor
| Node* NonBatchSprites::_spritesAnchor = nullptr |
|
protected |
◆ _totalSprites
| cocos2d::Label* NonBatchSprites::_totalSprites = nullptr |
|
protected |
◆ DEST_DT_30FPS
| const float NonBatchSprites::DEST_DT_30FPS = 1.0f / 30.0f |
|
protected |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp