Vivid
Loading...
Searching...
No Matches
Component.h
1#pragma once
2
3#include "editor/camera/Camera.h"
4#include "ComponentType.h"
5
6namespace Vivid
7{
15 {
16 private:
17 const int m_ID;
18
19 protected:
20 int m_OwnerEntityID = 0;
21
22 public:
23 Component();
24 virtual ~Component() = default;
25
26 virtual void Draw(Camera* camera) = 0;
27 virtual void ImGuiRender() = 0;
28
29 [[nodiscard]]
30 int GetOwnerEntityID() const { return m_OwnerEntityID; }
31 void SetEntity(const int& entityID) { m_OwnerEntityID = entityID; }
32
33 virtual ComponentType GetComponentType() = 0;
34 int GetComponentID() const { return m_ID; }
35 };
36}
A class that represents the camera.
Definition: Camera.h:25
Contains a Component.
Definition: Component.h:15