Created PlayerManager
This commit is contained in:
@@ -3,9 +3,24 @@
|
||||
|
||||
#include "player.hpp"
|
||||
|
||||
#include <map>
|
||||
|
||||
class PlayerManager {
|
||||
public:
|
||||
PlayerManager();
|
||||
~PlayerManager();
|
||||
|
||||
Player* New(int index, SDL_Surface* avatarSheet);
|
||||
Player* Get(int index);
|
||||
void Delete(int index);
|
||||
|
||||
void UpdateAll(int delta);
|
||||
void DrawAllTo(SDL_Surface* dest);
|
||||
void DeleteAll();
|
||||
|
||||
Player* operator[](int i) { return Get(i); }
|
||||
private:
|
||||
std::map<int, Player*> playerMap;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user