MCPcopy Create free account
hub / github.com/axmolengine/axmol / onEnter

Method onEnter

tests/cpp-tests/Source/ActionManagerTest/ActionManagerTest.cpp:75–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73//------------------------------------------------------------------
74
75void CrashTest::onEnter()
76{
77 ActionManagerTest::onEnter();
78
79 auto child = Sprite::create(s_pathGrossini);
80 child->setPosition(VisibleRect::center());
81 addChild(child, 1, kTagGrossini);
82
83 // Sum of all action's duration is 1.5 second.
84 child->runAction(RotateBy::create(1.5f, 90));
85 child->runAction(Sequence::create(DelayTime::create(1.4f), FadeOut::create(1.1f), nullptr));
86
87 // After 1.5 second, self will be removed.
88 child->runAction(Sequence::create(DelayTime::create(1.4f),
89 CallFunc::create(AX_CALLBACK_0(CrashTest::removeThis, this)), nullptr));
90}
91
92void CrashTest::removeThis()
93{

Callers

nothing calls this directly

Calls 14

createFunction · 0.85
topFunction · 0.85
getInstanceFunction · 0.85
setTagMethod · 0.80
scheduleOnceMethod · 0.80
setFlagsMethod · 0.80
autoreleaseMethod · 0.80
Vec2Function · 0.50
setPositionMethod · 0.45
runActionMethod · 0.45
addActionMethod · 0.45
pauseTargetMethod · 0.45

Tested by

no test coverage detected