Added codegen to register components, and started reworking lua
This commit is contained in:
25
test/include/components.h
Normal file
25
test/include/components.h
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user