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

Method popScene

core/base/Director.cpp:881–904  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

879}
880
881void Director::popScene()
882{
883 AXASSERT(_runningScene != nullptr, "running scene should not null");
884
885#if AX_ENABLE_GC_FOR_NATIVE_OBJECTS
886 auto sEngine = ScriptEngineManager::getInstance()->getScriptEngine();
887 if (sEngine)
888 {
889 sEngine->releaseScriptObject(this, _scenesStack.back());
890 }
891#endif // AX_ENABLE_GC_FOR_NATIVE_OBJECTS
892 _scenesStack.popBack();
893 ssize_t c = _scenesStack.size();
894
895 if (c == 0)
896 {
897 end();
898 }
899 else
900 {
901 _sendCleanupToScene = true;
902 _nextScene = _scenesStack.at(c - 1);
903 }
904}
905
906void Director::popToRootScene()
907{

Callers 2

onGoBackMethod · 0.80
item1ClickedMethod · 0.80

Calls 6

getInstanceFunction · 0.85
popBackMethod · 0.80
endFunction · 0.50
backMethod · 0.45
sizeMethod · 0.45
atMethod · 0.45

Tested by 2

onGoBackMethod · 0.64
item1ClickedMethod · 0.64