engine/include/components/component.hpp

44 lines
597 B
C++
Raw Normal View History

2022-09-02 11:06:59 +00:00
#pragma once
2022-09-07 09:02:01 +00:00
#include "engine_api.h"
2022-09-02 23:02:09 +00:00
2022-09-02 11:06:59 +00:00
class Object;
class Window;
class Input;
class ResourceManager;
2022-09-03 04:56:51 +00:00
class ENGINE_API Component {
2022-09-02 11:06:59 +00:00
public:
enum class TypeEnum {
TRANSFORM,
CAMERA,
RENDERER,
UI,
CUSTOM,
};
Component(Object* parent, TypeEnum type);
Component(const Component&) = delete;
Component& operator=(const Component&) = delete;
virtual ~Component() = 0;
int getID();
TypeEnum getType();
Object& parent;
protected:
Window& win;
Input& inp;
ResourceManager& res;
private:
static int s_next_component_id;
int m_id = s_next_component_id;
TypeEnum m_type;
};