mirror of
https://gitlab.com/voidframe/voidframe-cpp.git
synced 2026-07-01 18:55:12 -04:00
Begin implementation of Entities
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
class Entity;
|
||||
|
||||
class Component {
|
||||
|
||||
22
include/entity.h
Normal file
22
include/entity.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef VOID_ENTITY_H
|
||||
#define VOID_ENTITY_H
|
||||
#include "component.h"
|
||||
#include <vector>
|
||||
|
||||
class Entity {
|
||||
public:
|
||||
template <typename CompT, typename... Args>
|
||||
CompT *AddComponent(Args &&...args);
|
||||
|
||||
void Init();
|
||||
void Draw();
|
||||
void Update();
|
||||
void FixedUpdate();
|
||||
void Destroy();
|
||||
|
||||
private:
|
||||
std::vector<Component> components;
|
||||
};
|
||||
|
||||
#include "../src/entity_i.cpp"
|
||||
#endif // VOID_ENTITY_H
|
||||
Reference in New Issue
Block a user