#include <LayerTest.h>
|
| cocos2d::LayerColor * | _layer [3] |
| |
◆ CREATE_FUNC()
◆ onEnter()
| void LayerBug3162A::onEnter |
( |
| ) |
|
|
overridevirtual |
重载 TestCase .
在文件 LayerTest.cpp 第 788 行定义.
793 size.width = size.width / 2;
794 size.height = size.height / 3;
795 Color4B color[3] = {Color4B(255, 0, 0, 255), Color4B(0, 255, 0, 255), Color4B(0, 0, 255, 255)};
797 for (
int i = 0; i < 3; ++i)
799 _layer[i] = LayerColor::create(color[i]);
800 _layer[i]->setContentSize(size);
801 _layer[i]->setPosition(Vec2(size.width/2, size.height/2) - Vec2(20.0f, 20.0f));
802 _layer[i]->setOpacity(150);
803 _layer[i]->setCascadeOpacityEnabled(
true);
810 this->addChild(
_layer[0]);
cocos2d::LayerColor * _layer[3]
virtual void onEnter() override
static cocos2d::Rect getVisibleRect()
引用了 _layer, VisibleRect::getVisibleRect(), TestCase::onEnter() , 以及 step().
◆ step()
| void LayerBug3162A::step |
( |
float |
dt | ) |
|
◆ subtitle()
| std::string LayerBug3162A::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string LayerBug3162A::title |
( |
| ) |
const |
|
overridevirtual |
◆ _layer
| cocos2d::LayerColor* LayerBug3162A::_layer[3] |
|
private |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/LayerTest/LayerTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/LayerTest/LayerTest.cpp