1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- //
- // IAPUserData.hpp
- // TileManor
- //
- // Created by 徐炼新 on 2024/9/30.
- //
- #ifndef IAPUserData_hpp
- #define IAPUserData_hpp
- #include <cocos2d.h>
- #include "IAPDefine.hpp"
- NS_IAP_BEGIN
- class IAPUserData {
- public:
- static IAPUserData* getInstance();
-
- void init();
-
- // 添加购买信息
- // 参数说明 : 商品id
- void addBuyInfo(std::string commodityID);
-
- // 获取用户购买记录
- std::vector<std::string> getBuyInfos();
-
- // 清除所有购买信息
- void clearBuyInfo();
- private:
-
-
- private:
- static IAPUserData* _instance;
-
- std::vector<std::string> _buyInfos; // 用户购买信息
- };
- NS_IAP_END
- #endif /* IAPUserData_hpp */
|