0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 09:03:42 +00:00
2024-01-23 18:50:21 +01:00

29 lines
502 B
C++

#pragma once
#include <iostream>
#include <vector>
#include <memory>
#include <algorithm>
#include <bitset>
#include <array>
#include "Constants.h"
class Component;
class Entity;
class Manager;
using ComponentID = std::size_t;
using Group = std::size_t;
inline ComponentID getNewComponentTypeID()
{
static ComponentID lastID = 0u;
return lastID++;
}
template <typename T> inline ComponentID getComponentTypeID() noexcept
{
static ComponentID typeID = getNewComponentTypeID();
return typeID;
}