2022-08-01 11:18:03 -04:00
|
|
|
#pragma once
|
|
|
|
|
2022-10-23 10:54:42 -04:00
|
|
|
#include "../DefaultInclude.hpp"
|
2022-10-30 14:59:20 -04:00
|
|
|
|
2022-10-23 10:54:42 -04:00
|
|
|
#include <cocos2d.h>
|
|
|
|
|
2022-10-13 05:56:23 -04:00
|
|
|
namespace cocos2d {
|
|
|
|
class CCArray;
|
|
|
|
class CCNode;
|
|
|
|
}
|
2022-08-01 11:18:03 -04:00
|
|
|
|
|
|
|
namespace geode {
|
2024-06-20 16:00:04 -04:00
|
|
|
class GEODE_DLL SceneManager final {
|
2022-08-01 11:18:03 -04:00
|
|
|
protected:
|
|
|
|
cocos2d::CCArray* m_persistedNodes;
|
2023-10-11 15:16:12 -04:00
|
|
|
cocos2d::CCScene* m_lastScene = nullptr;
|
2022-08-01 11:18:03 -04:00
|
|
|
|
|
|
|
bool setup();
|
|
|
|
|
|
|
|
virtual ~SceneManager();
|
|
|
|
|
|
|
|
public:
|
|
|
|
static SceneManager* get();
|
|
|
|
|
|
|
|
void keepAcrossScenes(cocos2d::CCNode* node);
|
|
|
|
void forget(cocos2d::CCNode* node);
|
|
|
|
|
|
|
|
void willSwitchToScene(cocos2d::CCScene* scene);
|
|
|
|
};
|
|
|
|
}
|