aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-memory-efficient/src/ComponentManager.cpp
blob: 8c1fd232f4eef67cbc7d5231150f85aa0d6652c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "ComponentManager.h"

ComponentManager ComponentManager::mInstance;

ComponentManager & ComponentManager::GetInstance() { return mInstance; }

ComponentManager::ComponentManager() {}

std::vector<std::reference_wrapper<Sprite>>
ComponentManager::getAllSpriteReferences() {
	return mSpriteContainer.getAllReferences();
}

std::vector<std::reference_wrapper<Rigidbody>>
ComponentManager::getAllRigidbodyReferences() {
	return mRigidbodyContainer.getAllReferences();
}

std::vector<std::reference_wrapper<Colider>>
ComponentManager::getAllColiderReferences() {
	return mColiderContainer.getAllReferences();
}