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