// // IAPDefine.hpp // TileManor // // Created by 徐炼新 on 2024/9/30. // #ifndef IAPDefine_h #define IAPDefine_h #include #include #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 cb) = 0; // 释放 virtual void release() = 0; // 获取卡片大小 virtual cocos2d::Size getSize() = 0; }; // 在商店中的一个活动版位 typedef struct { std::string id; std::vector cards; std::string priority; // 活动优先级 } IAPPlacement; // 显示商店时的一些要求 typedef struct { int coinsMin; } ShopRequirement; NS_IAP_END #endif /* IAPDefine_h */