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

Method create

tests/cpp-tests/Source/SceneTest/SceneTest.cpp:240–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240SceneTestScene* SceneTestScene::create(int testIndex /* = 1 */)
241{
242 auto scene = new SceneTestScene;
243 if (scene->init())
244 {
245 scene->autorelease();
246 switch (testIndex)
247 {
248 case 1:
249 scene->addChild(SceneTestLayer1::create());
250 break;
251 case 2:
252 scene->addChild(SceneTestLayer2::create());
253 break;
254 case 3:
255 scene->addChild(SceneTestLayer3::create());
256 break;
257 default:
258 break;
259 }
260 }
261 else
262 {
263 delete scene;
264 scene = nullptr;
265 }
266
267 return scene;
268}

Callers

nothing calls this directly

Calls 4

createFunction · 0.85
autoreleaseMethod · 0.80
initMethod · 0.45
addChildMethod · 0.45

Tested by

no test coverage detected