BTManger.hpp 748 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // BTManger.hpp
  3. // redream_runtime
  4. //
  5. // Created by zhu on 2022/11/26.
  6. //
  7. #ifndef BTManger_hpp
  8. #define BTManger_hpp
  9. #include "cocos2d.h"
  10. #include "ReboltRunDelegate.hpp"
  11. class BTManger : Ref{
  12. public:
  13. static BTManger* getInstance();
  14. BTManger();
  15. ~BTManger();
  16. void startGame();
  17. void updateTime(float dt);
  18. void update(float dt);
  19. void setRootPath(std::string path);
  20. private:
  21. double _gameStartTime;
  22. double _gameRunTime;
  23. int _gameRunFram;
  24. map<std::string, std::string> _globalVarStringMap;
  25. public:
  26. void setGlobalDataVar(std::string key, std::string content);
  27. std::string getGlobalDataVar(std::string key, ReboltErrorInfo& errorInfo);
  28. };
  29. #endif /* BTManger_hpp */