title |
---|
src/ecs/Entity.hpp |
Name |
---|
ecs |
Name | |
---|---|
class | ecs::Entity |
#pragma once
#include <cstddef>
namespace ecs
{
class Entity {
public:
friend class Registry;
explicit operator size_t &() { return _id; }
explicit operator size_t() const { return _id; }
private:
explicit Entity(size_t id) : _id(id) {}
size_t &operator=(const std::size_t &id)
{
_id = id;
return _id;
}
std::size_t _id;
};
} // namespace ecs
Updated on 2022-11-13 at 17:21:37 +0100