1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#pragma once class GameProgress { private: static GameProgress *instance; public: static const long long UPDATE_FREQUENCY = 64 * 1000; static void Tick(); static void Flush(int iPad); protected: GameProgress(); int m_nextPad; long long m_lastUpdate; void updatePlayer(int iPad); float calcGameProgress(int achievementsUnlocked); };