#include <ActionsTest.h>
◆ callback1()
| void ActionCallFunction::callback1 |
( |
| ) |
|
在文件 ActionsTest.cpp 第 933 行定义.
935 auto s = Director::getInstance()->getWinSize();
936 auto label = Label::createWithTTF(
"callback 1 called",
"fonts/Marker Felt.ttf", 16.0f);
937 label->setPosition(s.width/4*1,s.height/2);
被这些函数引用 onEnter().
◆ callback2()
| void ActionCallFunction::callback2 |
( |
Node * |
pTarget | ) |
|
在文件 ActionsTest.cpp 第 942 行定义.
944 auto s = Director::getInstance()->getWinSize();
945 auto label = Label::createWithTTF(
"callback 2 called",
"fonts/Marker Felt.ttf", 16.0f);
946 label->setPosition(s.width/4*2,s.height/2);
950 CCLOG(
"sender is: %p", sender);
被这些函数引用 onEnter().
◆ callback3()
| void ActionCallFunction::callback3 |
( |
Node * |
pTarget, |
|
|
long |
data |
|
) |
| |
在文件 ActionsTest.cpp 第 953 行定义.
955 auto s = Director::getInstance()->getWinSize();
956 auto label = Label::createWithTTF(
"callback 3 called",
"fonts/Marker Felt.ttf", 16.0f);
957 label->setPosition(s.width/4*3,s.height/2);
960 CCLOG(
"target is: %p, data is: %ld", sender, data);
被这些函数引用 onEnter().
◆ CREATE_FUNC()
◆ onEnter()
| void ActionCallFunction::onEnter |
( |
| ) |
|
|
overridevirtual |
重载 ActionsDemo .
在文件 ActionsTest.cpp 第 895 行定义.
902 auto action1 = Sequence::create(
903 MoveBy::create(2, Vec2(200.0f,0.0f)),
908 auto s = Director::getInstance()->getWinSize();
909 auto label = Label::createWithTTF(
"called:lambda callback",
"fonts/Marker Felt.ttf", 16.0f);
910 label->setPosition(s.width/4*1,s.height/2-40);
911 this->addChild(label);
915 auto action2 = Sequence::create(
916 ScaleBy::create(2 , 2),
921 auto action3 = Sequence::create(
922 RotateBy::create(3 , 360),
void callback3(Node *pTarget, long data)
void callback2(Node *pTarget)
void centerSprites(unsigned int numberOfSprites)
cocos2d::Sprite * _grossini
virtual void onEnter() override
cocos2d::Sprite * _tamara
cocos2d::Sprite * _kathia
引用了 ActionsDemo::_grossini, ActionsDemo::_kathia, ActionsDemo::_tamara, callback1(), callback2(), callback3(), ActionsDemo::centerSprites() , 以及 ActionsDemo::onEnter().
◆ subtitle()
| std::string ActionCallFunction::subtitle |
( |
| ) |
const |
|
overridevirtual |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp