engine/include/components/component.hpp

44 lines
591 B
C++
Raw Normal View History

2022-09-02 11:06:59 +00:00
#pragma once
2022-09-02 23:02:09 +00:00
#include "export.h"
2022-09-02 11:06:59 +00:00
class Object;
class Window;
class Input;
class ResourceManager;
2022-09-02 23:02:09 +00:00
class DECLSPEC 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;
};