Files
project_misth/include/ecs/ecs.h
T
syedm 1eba06f19b Basic ECS setup.
- Added std::variant to pch.h
2026-11-04 09:08:38 +00:00

28 lines
480 B
C++

#ifndef ECS_H
#define ECS_H
#include "bindings/ruby.h"
#include "utils.h"
struct Entity {
Vec2<float> position;
std::unordered_map<std::string, size_t> components;
};
struct Component {
enum struct Type {
Int,
Float,
Boolean,
RubyObject
};
std::unordered_map<std::string, std::variant<int64_t, double, bool, Ruby::RubyObject>> globals;
std::vector<std::tuple<std::string, Type, void *>> table;
};
struct System {
Ruby::Block function;
};
#endif