1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // IAPDefine.hpp
- // TileManor
- //
- // Created by 徐炼新 on 2024/9/30.
- //
- #ifndef IAPDefine_h
- #define IAPDefine_h
- #include <string>
- #include <vector>
- #include "cocos2d.h"
- #define NS_IAP_BEGIN namespace iap {
- #define NS_IAP_END }
- NS_IAP_BEGIN
- // 卡片的实例
- class IAPCard {
- public:
- // 创建一个实例节点
- virtual Node* create() = 0;
-
- // 设置点击回调
- virtual void setCbWhileClicked(std::function<void()> cb) = 0;
-
- // 释放
- virtual void release() = 0;
- };
- // 在商店中的一个活动版位
- typedef struct {
- std::string id;
- std::vector<IAPCard*> cards;
- } IAPPlacement;
- // 显示商店时的一些要求
- typedef struct {
- int coinsMin;
- } ShopRequirement;
- NS_IAP_END
- #endif /* IAPDefine_h */
|