I think I've got my head around what ECS does and am slowly reshaping the engine to use it better.

This commit is contained in:
Zed A. Shaw 2024-10-16 20:31:00 -04:00
parent da04c5ec54
commit e42647d727
5 changed files with 93 additions and 76 deletions

28
components.hpp Normal file
View file

@ -0,0 +1,28 @@
#pragma once
#include "dinkyecs.hpp"
struct Player {
DinkyECS::Entity entity;
};
struct Position {
Point location;
};
struct Motion {
int dx;
int dy;
};
struct Combat {
int hp;
int damage;
};
struct Treasure {
int amount;
};
struct Tile {
std::string chr = "!";
};