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

Method onEnter

tests/cpp-tests/Source/ActionsTest/ActionsTest.cpp:107–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void ActionsDemo::onEnter()
108{
109 TestCase::onEnter();
110
111 // Or you can create an sprite using a filename. only PNG is supported now.
112 _grossini = Sprite::create(s_pathGrossini);
113 _grossini->retain();
114
115 _tamara = Sprite::create(s_pathSister1);
116 _tamara->retain();
117
118 _kathia = Sprite::create(s_pathSister2);
119 _kathia->retain();
120
121 addChild(_grossini, 1);
122 addChild(_tamara, 2);
123 addChild(_kathia, 3);
124
125 _grossini->setPosition(VisibleRect::center().x,
126 VisibleRect::bottom().y + VisibleRect::getVisibleRect().size.height / 3);
127 _tamara->setPosition(VisibleRect::center().x,
128 VisibleRect::bottom().y + VisibleRect::getVisibleRect().size.height * 2 / 3);
129 _kathia->setPosition(VisibleRect::center().x,
130 VisibleRect::bottom().y + VisibleRect::getVisibleRect().size.height / 2);
131}
132
133void ActionsDemo::onExit()
134{

Callers

nothing calls this directly

Calls 15

createFunction · 0.85
getInstanceFunction · 0.85
Color4BFunction · 0.85
format_to_zFunction · 0.85
Color3BFunction · 0.85
runActionFunction · 0.85
scheduleUpdateFunction · 0.85
addAnimationsWithFileMethod · 0.80
pushBackMethod · 0.80

Tested by

no test coverage detected