SDL Minigame  1.0
Loading...
Searching...
No Matches
ECS.h
1#pragma once
2
3#include "Component.h"
4#include "Constants.h"
5
6class Component;
7class Entity;
8class Manager;
9
10using ComponentID = std::size_t;
11using Group = std::size_t;
12
13inline ComponentID getNewComponentTypeID()
14{
15 static ComponentID lastID = 0u;
16 return lastID++;
17}
18
19template <typename T> inline ComponentID getComponentTypeID() noexcept
20{
21 static ComponentID typeID = getNewComponentTypeID();
22 return typeID;
23}
Definition Component.h:6
Main class for any object in game, stores associations, labeling and components.
Definition Entity.h:29
Is responsible for managing all entities.
Definition Manager.h:20