-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraphicsComponent.h
51 lines (40 loc) · 1.02 KB
/
GraphicsComponent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include "Component.h"
#include "TransformComponent.h"
#include <string>
#include <SFML/Graphics.hpp>
#include "GameObjectSharer.h"
#include <iostream>
using namespace sf;
using namespace std;
class GraphicsComponent : public Component {
private:
string m_Type = "graphics";
bool m_Enabled = false;
public:
virtual void draw(
RenderWindow& window,
shared_ptr<TransformComponent> t) = 0;
virtual void initializeGraphics(
string bitmapName,
Vector2f objectSize) = 0;
/****************************************************
*****************************************************
From Component interface
*****************************************************
*****************************************************/
string Component::getType() {
return m_Type;
}
void Component::disableComponent() {
m_Enabled = false;
}
void Component::enableComponent() {
m_Enabled = true;
}
bool Component::enabled() {
return m_Enabled;
}
void Component::start(
GameObjectSharer* gos, GameObject* self) {}
};