mirror of https://github.com/axmolengine/axmol.git
Supplement some Reader.
This commit is contained in:
parent
6f20da4444
commit
a0a461f319
|
@ -224,7 +224,11 @@ void CSLoader::destroyCocosStudio()
|
|||
SingleNodeReader::destroyInstance();
|
||||
SpriteReader::destroyInstance();
|
||||
ParticleReader::destroyInstance();
|
||||
GameMapReader::destroyInstance();
|
||||
ProjectNodeReader::destroyInstance();
|
||||
ComAudioReader::destroyInstance();
|
||||
|
||||
WidgetReader::destroyInstance();
|
||||
ButtonReader::destroyInstance();
|
||||
CheckBoxReader::destroyInstance();
|
||||
ImageViewReader::destroyInstance();
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace cocostudio
|
|||
return _instanceTMXTiledMapReader;
|
||||
}
|
||||
|
||||
void GameMapReader::purge()
|
||||
void GameMapReader::destroyInstance()
|
||||
{
|
||||
CC_SAFE_DELETE(_instanceTMXTiledMapReader);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace cocostudio
|
|||
~GameMapReader();
|
||||
|
||||
static GameMapReader* getInstance();
|
||||
static void purge();
|
||||
static void destroyInstance();
|
||||
|
||||
flatbuffers::Offset<flatbuffers::Table> createOptionsWithFlatBuffers(const tinyxml2::XMLElement* objectData,
|
||||
flatbuffers::FlatBufferBuilder* builder);
|
||||
|
|
|
@ -102,6 +102,13 @@ void CocosStudio3DTestDemo::onEnter()
|
|||
BaseTest::onEnter();
|
||||
}
|
||||
|
||||
void CocosStudio3DTestDemo::onExit()
|
||||
{
|
||||
CSLoader::destroyCocosStudio();
|
||||
|
||||
BaseTest::onExit();
|
||||
}
|
||||
|
||||
void CocosStudio3DTestDemo::restartCallback(Ref* sender)
|
||||
{
|
||||
auto s = new (std::nothrow) CS3DTestScene();
|
||||
|
|
|
@ -47,6 +47,7 @@ public:
|
|||
virtual std::string title() const override;
|
||||
virtual std::string subtitle() const override;
|
||||
virtual void onEnter() override;
|
||||
virtual void onExit() override;
|
||||
};
|
||||
|
||||
class CSNode3DTest : public CocosStudio3DTestDemo
|
||||
|
|
|
@ -165,8 +165,7 @@ void ActionTimelineTestLayer::onExit()
|
|||
|
||||
backItem = restartItem = nextItem = nullptr;
|
||||
|
||||
ActionTimelineCache::getInstance()->purge();
|
||||
CSLoader::getInstance()->purge();
|
||||
CSLoader::destroyCocosStudio();
|
||||
|
||||
Layer::onExit();
|
||||
}
|
||||
|
|
|
@ -200,6 +200,8 @@ void ArmatureTestLayer::onExit()
|
|||
|
||||
backItem = restartItem = nextItem = nullptr;
|
||||
|
||||
CSLoader::destroyCocosStudio();
|
||||
|
||||
Layer::onExit();
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,13 @@ void CustomWidgetCallbackBindScene::onEnter()
|
|||
addChild(pMenu, 1);
|
||||
}
|
||||
|
||||
void CustomWidgetCallbackBindScene::onExit()
|
||||
{
|
||||
CSLoader::destroyCocosStudio();
|
||||
|
||||
Scene::onExit();
|
||||
}
|
||||
|
||||
void CustomWidgetCallbackBindScene::runThisTest()
|
||||
{
|
||||
CSLoader* instance = CSLoader::getInstance();
|
||||
|
|
|
@ -10,6 +10,7 @@ class CustomWidgetCallbackBindScene : public TestScene
|
|||
{
|
||||
public:
|
||||
virtual void onEnter() override;
|
||||
virtual void onExit() override;
|
||||
virtual void runThisTest();
|
||||
void BackCallback(cocos2d::Ref* pSender);
|
||||
};
|
||||
|
|
|
@ -19,6 +19,13 @@ UIScene_Editor::~UIScene_Editor()
|
|||
|
||||
}
|
||||
|
||||
void UIScene_Editor::onExit()
|
||||
{
|
||||
CSLoader::destroyCocosStudio();
|
||||
|
||||
Layer::onExit();
|
||||
}
|
||||
|
||||
bool UIScene_Editor::init()
|
||||
{
|
||||
if (CCLayer::init())
|
||||
|
|
|
@ -59,6 +59,8 @@ public:
|
|||
UIScene_Editor();
|
||||
~UIScene_Editor();
|
||||
|
||||
virtual void onExit() override;
|
||||
|
||||
bool init();
|
||||
virtual void previousCallback(Ref* sender, Widget::TouchEventType event);
|
||||
virtual void nextCallback(Ref* sender, Widget::TouchEventType event);
|
||||
|
|
Loading…
Reference in New Issue