Added codegen to register components, and started reworking lua

This commit is contained in:
2019-06-07 15:52:57 +02:00
parent 53a0b98341
commit 7ff9e21b4d
14 changed files with 381 additions and 110 deletions

25
test/include/components.h Normal file
View File

@@ -0,0 +1,25 @@
#pragma once
#include "ecs.h"
struct Position : ecs::Component {
Position(float _x, float _y) : x(_x), y(_y) {}
Position() {}
float x = 0;
float y = 0;
};
struct Velocity : ecs::Component {
Velocity(float _x, float _y) : x(_x), y(_y) {}
Velocity() {}
float x = 0;
float y = 0;
};
struct Meta : ecs::Component {
Meta(std::string _name) : name(_name) {}
Meta() {}
std::string name;
};