initial components
This commit is contained in:
18
include/GameObject.h
Normal file
18
include/GameObject.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include <memory>
|
||||
|
||||
#include "Graphics.h"
|
||||
#include "components/GraphicsComponent.h"
|
||||
|
||||
class GameObject : std::enable_shared_from_this<GameObject> {
|
||||
public:
|
||||
GameObject(std::unique_ptr<GraphicsComponent> graphics)
|
||||
: m_graphics(std::move(graphics)) {}
|
||||
|
||||
void update(Graphics &graphics) {
|
||||
m_graphics->update(graphics);
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<GraphicsComponent> m_graphics;
|
||||
};
|
||||
Reference in New Issue
Block a user