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();
|
SingleNodeReader::destroyInstance();
|
||||||
SpriteReader::destroyInstance();
|
SpriteReader::destroyInstance();
|
||||||
ParticleReader::destroyInstance();
|
ParticleReader::destroyInstance();
|
||||||
|
GameMapReader::destroyInstance();
|
||||||
|
ProjectNodeReader::destroyInstance();
|
||||||
|
ComAudioReader::destroyInstance();
|
||||||
|
|
||||||
|
WidgetReader::destroyInstance();
|
||||||
ButtonReader::destroyInstance();
|
ButtonReader::destroyInstance();
|
||||||
CheckBoxReader::destroyInstance();
|
CheckBoxReader::destroyInstance();
|
||||||
ImageViewReader::destroyInstance();
|
ImageViewReader::destroyInstance();
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace cocostudio
|
||||||
return _instanceTMXTiledMapReader;
|
return _instanceTMXTiledMapReader;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameMapReader::purge()
|
void GameMapReader::destroyInstance()
|
||||||
{
|
{
|
||||||
CC_SAFE_DELETE(_instanceTMXTiledMapReader);
|
CC_SAFE_DELETE(_instanceTMXTiledMapReader);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace cocostudio
|
||||||
~GameMapReader();
|
~GameMapReader();
|
||||||
|
|
||||||
static GameMapReader* getInstance();
|
static GameMapReader* getInstance();
|
||||||
static void purge();
|
static void destroyInstance();
|
||||||
|
|
||||||
flatbuffers::Offset<flatbuffers::Table> createOptionsWithFlatBuffers(const tinyxml2::XMLElement* objectData,
|
flatbuffers::Offset<flatbuffers::Table> createOptionsWithFlatBuffers(const tinyxml2::XMLElement* objectData,
|
||||||
flatbuffers::FlatBufferBuilder* builder);
|
flatbuffers::FlatBufferBuilder* builder);
|
||||||
|
|
|
@ -102,6 +102,13 @@ void CocosStudio3DTestDemo::onEnter()
|
||||||
BaseTest::onEnter();
|
BaseTest::onEnter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CocosStudio3DTestDemo::onExit()
|
||||||
|
{
|
||||||
|
CSLoader::destroyCocosStudio();
|
||||||
|
|
||||||
|
BaseTest::onExit();
|
||||||
|
}
|
||||||
|
|
||||||
void CocosStudio3DTestDemo::restartCallback(Ref* sender)
|
void CocosStudio3DTestDemo::restartCallback(Ref* sender)
|
||||||
{
|
{
|
||||||
auto s = new (std::nothrow) CS3DTestScene();
|
auto s = new (std::nothrow) CS3DTestScene();
|
||||||
|
|
|
@ -47,6 +47,7 @@ public:
|
||||||
virtual std::string title() const override;
|
virtual std::string title() const override;
|
||||||
virtual std::string subtitle() const override;
|
virtual std::string subtitle() const override;
|
||||||
virtual void onEnter() override;
|
virtual void onEnter() override;
|
||||||
|
virtual void onExit() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CSNode3DTest : public CocosStudio3DTestDemo
|
class CSNode3DTest : public CocosStudio3DTestDemo
|
||||||
|
|
|
@ -164,9 +164,8 @@ void ActionTimelineTestLayer::onExit()
|
||||||
removeAllChildren();
|
removeAllChildren();
|
||||||
|
|
||||||
backItem = restartItem = nextItem = nullptr;
|
backItem = restartItem = nextItem = nullptr;
|
||||||
|
|
||||||
ActionTimelineCache::getInstance()->purge();
|
CSLoader::destroyCocosStudio();
|
||||||
CSLoader::getInstance()->purge();
|
|
||||||
|
|
||||||
Layer::onExit();
|
Layer::onExit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,6 +199,8 @@ void ArmatureTestLayer::onExit()
|
||||||
removeAllChildren();
|
removeAllChildren();
|
||||||
|
|
||||||
backItem = restartItem = nextItem = nullptr;
|
backItem = restartItem = nextItem = nullptr;
|
||||||
|
|
||||||
|
CSLoader::destroyCocosStudio();
|
||||||
|
|
||||||
Layer::onExit();
|
Layer::onExit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,13 @@ void CustomWidgetCallbackBindScene::onEnter()
|
||||||
addChild(pMenu, 1);
|
addChild(pMenu, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CustomWidgetCallbackBindScene::onExit()
|
||||||
|
{
|
||||||
|
CSLoader::destroyCocosStudio();
|
||||||
|
|
||||||
|
Scene::onExit();
|
||||||
|
}
|
||||||
|
|
||||||
void CustomWidgetCallbackBindScene::runThisTest()
|
void CustomWidgetCallbackBindScene::runThisTest()
|
||||||
{
|
{
|
||||||
CSLoader* instance = CSLoader::getInstance();
|
CSLoader* instance = CSLoader::getInstance();
|
||||||
|
|
|
@ -10,6 +10,7 @@ class CustomWidgetCallbackBindScene : public TestScene
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void onEnter() override;
|
virtual void onEnter() override;
|
||||||
|
virtual void onExit() override;
|
||||||
virtual void runThisTest();
|
virtual void runThisTest();
|
||||||
void BackCallback(cocos2d::Ref* pSender);
|
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()
|
bool UIScene_Editor::init()
|
||||||
{
|
{
|
||||||
if (CCLayer::init())
|
if (CCLayer::init())
|
||||||
|
|
|
@ -59,6 +59,8 @@ public:
|
||||||
UIScene_Editor();
|
UIScene_Editor();
|
||||||
~UIScene_Editor();
|
~UIScene_Editor();
|
||||||
|
|
||||||
|
virtual void onExit() override;
|
||||||
|
|
||||||
bool init();
|
bool init();
|
||||||
virtual void previousCallback(Ref* sender, Widget::TouchEventType event);
|
virtual void previousCallback(Ref* sender, Widget::TouchEventType event);
|
||||||
virtual void nextCallback(Ref* sender, Widget::TouchEventType event);
|
virtual void nextCallback(Ref* sender, Widget::TouchEventType event);
|
||||||
|
|
Loading…
Reference in New Issue