BTManger.hpp 819 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. /// setRootPath可以删除(历史包袱原因,接口名留着)
  20. void setRootPath(std::string path){};
  21. private:
  22. double _gameStartTime;
  23. double _gameRunTime;
  24. int _gameRunFram;
  25. map<std::string, std::string> _globalVarStringMap;
  26. public:
  27. void setGlobalDataVar(std::string key, std::string content);
  28. std::string getGlobalDataVar(std::string key, ReboltErrorInfo& errorInfo);
  29. };
  30. #endif /* BTManger_hpp */