Files
GDevelop/Extensions/PlatformBehavior/ScenePlatformObjectsManager.cpp
T
Florian Rival a8559bfbbc Add clang-format to format (C++) source files automatically (#491)
* Update all CMakeLists of extensions to use clang-format
* Run clang-format on all Extensions
* Update GDCore CMakeLists.txt to add clang-format
* Run clang-format on GDCore files
* Update GDJS and GDCpp CMakeLists.txt to add clang-format
* Run clang-format on GDCpp and GDJS files
2018-05-09 15:57:38 -07:00

20 lines
600 B
C++

#include "ScenePlatformObjectsManager.h"
#include "PlatformBehavior.h"
std::map<RuntimeScene*, ScenePlatformObjectsManager>
ScenePlatformObjectsManager::managers;
ScenePlatformObjectsManager::~ScenePlatformObjectsManager() {
for (std::set<PlatformBehavior*>::iterator it = allPlatforms.begin();
it != allPlatforms.end();) {
(*it++)->Activate(false);
}
}
void ScenePlatformObjectsManager::AddPlatform(PlatformBehavior* platform) {
allPlatforms.insert(platform);
}
void ScenePlatformObjectsManager::RemovePlatform(PlatformBehavior* platform) {
allPlatforms.erase(platform);
}