R-Type  1.0.1.0
Rewrite of the R-Type game with networking ability
Loading...
Searching...
No Matches
Entity.hpp
1/*
2** EPITECH PROJECT, 2023
3** Components.hpp
4** File description:
5** Components.hpp
6*/
7
8#ifndef URANUS_ENTITY_HPP
9#define URANUS_ENTITY_HPP
10
11#include "uranus/Core.hpp"
12#include <cstddef>
13
14namespace uranus::ecs {
15
16 class Registry;
17
21 class Entity {
22 friend class Registry;
23
24 public:
28 ~Entity() = default;
29
34 inline operator std::size_t() const { return _id; }; // NOLINT
35
40 inline operator std::size_t&() { return _id; } // NOLINT
41
42 private:
46 explicit Entity(size_t id) : _id(id) {}
47
48 size_t _id;
49 };
50} // namespace uranus::ecs
51
52#endif // URANUS_ENTITY_HPP
This file is used to include some core files of the engine.
Entity class, used to identify entities.
Definition: Entity.hpp:21
size_t _id
Id of the entity.
Definition: Entity.hpp:48
Entity(size_t id)
Constructor of the Entity class.
Definition: Entity.hpp:46
~Entity()=default
Default destructor.
Registry class, used to store and manage entities and their components.
Definition: Registry.hpp:26
Namespace containing all the ECS related classes.
Definition: Components.hpp:21