Elevate Engine 1
Loading...
Searching...
No Matches
ComponentWrapper.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include "Component.h"
6
7// TODO REMOVE THIS CALSS IF IT REMAINS UNUSED
8//namespace Elevate
9//{
10// struct ComponentWrapper
11// {
12// ComponentWrapper() = default;
13//
14// inline void SetGameObject(GameObject* gO)
15// {
16// component->gameObject = gO;
17// }
18//
19// template<typename T, typename... Args>
20// inline void SetComponent(Args&&... args)
21// {
22// component = std::make_shared<T>(std::forward<Args>(args)...);
23// }
24//
25// inline bool IsActive() {
26// if (component && component.use_count() > 0) {
27// return component->m_IsActive;
28// }
29// else return false;
30// }
31//
32// inline void Init() { component->Init(); }
33// inline void Destroy() { component->Destroy(); }
34// inline void Update() { component->Update(); }
35// inline void Render() { component->Render(); }
36// inline void OnNotify(Event& e) { component->OnNotify(e); }
37//
38// std::shared_ptr<Component> component;
39// };
40//}