Porting in old gamejam code. Removed SOME cruft, more likely remains. Sound + sprite test.
This commit is contained in:
parent
1784489dfb
commit
d2499a67f8
27 changed files with 1090 additions and 4 deletions
25
src/EntityManager.h
Normal file
25
src/EntityManager.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
#include "Common.h"
|
||||
#include "Entity.h"
|
||||
|
||||
typedef std::vector<std::shared_ptr<Entity>> EntityVec;
|
||||
typedef std::map<std::string, EntityVec> EntityMap;
|
||||
|
||||
class EntityManager
|
||||
{
|
||||
EntityVec m_entities;
|
||||
EntityVec m_entitiesToAdd;
|
||||
EntityMap m_entityMap;
|
||||
size_t m_totalEntities;
|
||||
|
||||
void removeDeadEntities(EntityVec & vec);
|
||||
|
||||
public:
|
||||
EntityManager();
|
||||
void update();
|
||||
std::shared_ptr<Entity> addEntity(const std::string & tag);
|
||||
const EntityVec & getEntities();
|
||||
const EntityVec & getEntities(const std::string & tag);
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue