mirror of
https://gitlab.com/voidframe/voidframe-cpp.git
synced 2026-06-28 19:35:12 -04:00
Continue implementation of Entity::AddComponent()
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
class Entity {
|
||||
public:
|
||||
template <typename CompT, typename... Args>
|
||||
CompT *AddComponent(Args &&...args);
|
||||
Component *AddComponent(Args &&...args);
|
||||
|
||||
void Init();
|
||||
void Draw();
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
#pragma once
|
||||
#ifndef VOID_ENTITY_H
|
||||
#include "../include/entity.h"
|
||||
#endif
|
||||
|
||||
template <typename CompT, typename... Args>
|
||||
Component *Entity::AddComponent(Args &&...args) {
|
||||
return components.emplace_back(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user