-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntity.h
More file actions
46 lines (35 loc) · 952 Bytes
/
Copy pathEntity.h
File metadata and controls
46 lines (35 loc) · 952 Bytes
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
#ifndef ENTITY_H
#define ENTITY_H
#include <vector>
#include "Component.h"
#include "SpriteComponent.h"
#include "BoxComponent.h"
#include "MissileQueueComponent.h"
#include "PositionComponent.h"
#include "Missile1Component.h"
#include "Missile2Component.h"
#include "Missile3Component.h"
#include "CurrentMissileComponent.h"
#include "LevelElementComponent.h"
#include "StoneComponent.h"
#include "TargetComponent.h"
#include "ExplosionEffectComponent.h"
class Entity
{
public:
~Entity(){
for(Component* component:GetComponents()){
delete component;
}
};
void Add(Component* component);
void Remove(Component* component);
Component* GetComponent(Component::Tag tag);
std::vector<Component*>& GetComponents();
std::vector<Component::Tag>& GetTags();
bool HasComponent(Component::Tag);
private:
std::vector<Component*> components;
std::vector<Component::Tag> tags;
};
#endif