Porting in old gamejam code. Removed SOME cruft, more likely remains. Sound + sprite test.

This commit is contained in:
John McCardle 2023-02-24 23:46:34 -05:00
commit d2499a67f8
27 changed files with 1090 additions and 4 deletions

25
src/EntityManager.h Normal file
View 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);
};