mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-23 02:25:52 -04:00
a8559bfbbc
* 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
31 lines
892 B
C++
31 lines
892 B
C++
/**
|
|
|
|
GDevelop - Pathfinding Behavior Extension
|
|
Copyright (c) 2010-2016 Florian Rival (Florian.Rival@gmail.com)
|
|
This project is released under the MIT License.
|
|
*/
|
|
#include "ScenePathfindingObstaclesManager.h"
|
|
#include <iostream>
|
|
#include "PathfindingObstacleBehavior.h"
|
|
|
|
std::map<RuntimeScene*, ScenePathfindingObstaclesManager>
|
|
ScenePathfindingObstaclesManager::managers;
|
|
|
|
ScenePathfindingObstaclesManager::~ScenePathfindingObstaclesManager() {
|
|
for (std::set<PathfindingObstacleBehavior*>::iterator it =
|
|
allObstacles.begin();
|
|
it != allObstacles.end();
|
|
++it) {
|
|
(*it)->Activate(false);
|
|
}
|
|
}
|
|
|
|
void ScenePathfindingObstaclesManager::AddObstacle(
|
|
PathfindingObstacleBehavior* obstacle) {
|
|
allObstacles.insert(obstacle);
|
|
}
|
|
void ScenePathfindingObstaclesManager::RemoveObstacle(
|
|
PathfindingObstacleBehavior* obstacle) {
|
|
allObstacles.erase(obstacle);
|
|
}
|