aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-memory-efficient/src/ComponentManager.cpp
blob: 20d0ce0071e43df53b1a640a0e910fadf62c2758 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#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();
}