-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathEntityManager.cpp
More file actions
53 lines (42 loc) · 1.24 KB
/
EntityManager.cpp
File metadata and controls
53 lines (42 loc) · 1.24 KB
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
52
53
#include "EntityManager.h"
#include <iostream>
EntityManager::EntityManager()
{
std::cout << " EntityManager Construct !!" << std::endl;
}
EntityManager::~EntityManager()
{
std::cout << " EntityManager Destruct !!" << std::endl;
}
std::vector<Entity*> EntityManager::getEntityList()
{
return entity_list_;
}
//std::string EntityManager::getClassName()
//{
// std::cout << " ClassName EntityManager !!" << std::endl;
// return "EntityManager";
//}
void EntityManager::AddEntity(Entity* entity)
{
entity_list_.push_back(entity);
}
void EntityManager::PrintEntityListInfo(std::string str, int a)
{
for (EntityList::const_iterator itr = entity_list_.begin();
itr != entity_list_.end(); ++itr)
{
std::cout << (*itr)->GetVirtualName() << std::endl;
}
std::cout << "current index:" << a << " static: " << GetStaticValue() << "-" << GetFunctionValue() << std::endl
<< std::endl << std::endl;
}
void EntityManager::PrintEntityListInfoTest(std::string str, int a)
{
for (EntityList::const_iterator itr = entity_list_.begin(); itr != entity_list_.end(); ++itr)
{
std::cout << (*itr)->getTestName() << std::endl;
}
std::cout << str << a << std::endl;
}
EntityManager* gEntityMgr = new EntityManager;