123456789101112131415161718192021222324252627282930313233 |
- #ifndef INCLUDEPLAYERMANAGER_H
- #define INCLUDEPLAYERMANAGER_H
- #include <Player.h>
- #include <QObject>
- #include <vector>
- class PlayerManager : public QObject
- {
- Q_OBJECT
- private:
- explicit PlayerManager(QObject *parent = nullptr);
- public:
- static PlayerManager& getInstance() {
- static PlayerManager instance;
- return instance;
- }
- Player* getPlayer(int id);
- int getPlayersNum();
- void setPlayersNum(int num);
- private:
- std::vector<Player> players_;
- signals:
- public slots:
- };
- #endif // INCLUDEPLAYERMANAGER_H
|