1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- //
- // CtlSucessProcess.hpp
- // TileManor
- //
- // Created by 徐炼新 on 2024/1/25.
- //
- #ifndef IAPSucessProcess_hpp
- #define IAPSucessProcess_hpp
- #include <stdio.h>
- #include "cocos2d.h"
- #include "RUReboltLayer.h"
- #include "RUTableView.h"
- #include "IAPConf.hpp"
- class IAPCtlShopItem;
- class IAPSucessProcess : public cocos2d::Ref
- {
- public:
- // 在指定节点内创建
- static IAPSucessProcess* create(const GoodsInfo& gi);
-
- void setCBWhileFinished(std::function<void()> cb) { _cbWhileFinished = cb; }
- private:
- typedef struct _ndReward {
- Node* light = nullptr;
- Node* reward = nullptr;
- Node* lbCnt = nullptr;
-
- _ndReward() {
- light = nullptr;
- reward = nullptr;
- lbCnt = nullptr;
- }
- } NdReward;
-
- IAPSucessProcess();
- ~IAPSucessProcess();
-
- void init(const GoodsInfo& gi);
-
- void acceptItems();
- void acceptItem(NdReward& nr, cocos2d::Node* tar, float delay, const ItemInGoods&, std::function<void(const ItemInGoods&)> finished);
-
- void onNotifyDevelopment(const redutils::ReboltNotifyData& data);
-
- void someCollected();
- private:
- void setRewardInfo();
-
- redutils::RUReboltLayer* _layer = nullptr;
- GoodsInfo _goodsInfo;
-
- std::vector<NdReward> _ndsReward;
- cocos2d::Node* _item_coin = nullptr;
- redream::ReboltRedManager* _reboltMgr4Coin = nullptr;
- int _cntCollecting = 0;
- std::function<void()> _cbWhileFinished = nullptr;
- };
- #endif /* CtlSucessProcess_hpp */
|