#include <MotionStreakTest.h>
◆ CREATE_FUNC()
◆ onEnter()
| void MotionStreakTest2::onEnter |
( |
| ) |
|
|
overridevirtual |
重载 MotionStreakTest .
在文件 MotionStreakTest.cpp 第 109 行定义.
113 auto listener = EventListenerTouchAllAtOnce::create();
115 _eventDispatcher->addEventListenerWithSceneGraphPriority(listener,
this);
117 _yjzTest([
this,listener]()
119 listener->onTouchesBegan =
120 [
this](
const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event)
126 listener->onTouchesEnded =
127 [
this](
const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event)
133 listener->onTouchesCancelled =
134 [
this](
const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event)
140 auto s = Director::getInstance()->getWinSize();
146 _streak->setPosition( Vec2(s.width/2, s.height/2) );
void onTouchesMoved(const std::vector< cocos2d::Touch * > &touches, cocos2d::Event *event)
virtual void onEnter() override
cocos2d::MotionStreak * _streak
static const char s_streak[]
引用了 MotionStreakTest::_streak, MotionStreakTest::onEnter(), onTouchesMoved() , 以及 s_streak.
◆ onTouchesMoved()
| void MotionStreakTest2::onTouchesMoved |
( |
const std::vector< cocos2d::Touch * > & |
touches, |
|
|
cocos2d::Event * |
event |
|
) |
| |
◆ subtitle()
| std::string MotionStreakTest2::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string MotionStreakTest2::title |
( |
| ) |
const |
|
overridevirtual |
◆ _root
| cocos2d::Node* MotionStreakTest2::_root |
|
protected |
◆ _target
| cocos2d::Node* MotionStreakTest2::_target |
|
protected |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/MotionStreakTest/MotionStreakTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/MotionStreakTest/MotionStreakTest.cpp