Selaa lähdekoodia

完成了IAPDelegate抽象类

MoYuWang 9 kuukautta sitten
vanhempi
commit
20a9a50fda

+ 3 - 0
Classes/IAP/IAPCtlShop.cpp

@@ -134,6 +134,9 @@ void IAPCtlShop::addUserBuyInfo(std::string commodityID){
 
 void IAPCtlShop::clearUserBuyInfo(){
     iap::IAPUserData::getInstance()->clearBuyInfo();
+    if(_delegate){
+        _delegate->clearUserBuyInfo();
+    }
 }
 
 float IAPCtlShop::getUserBuyMaxAmount(){

+ 4 - 0
Classes/IAP/IAPDelegate.hpp

@@ -27,6 +27,10 @@ public:
     // 删除商店版位通知
     virtual void removePlacement(const std::string& id) = 0;
     
+    // 清除用户购买信息通知
+    virtual void clearUserBuyInfo() = 0;
+    
+    
 };
 
 

+ 0 - 0
Classes/IAP/Shop/IAPTestCardViewDelegate.cpp → Classes/IAPTestCardViewDelegate.cpp


+ 0 - 0
Classes/IAP/Shop/IAPTestCardViewDelegate.hpp → Classes/IAPTestCardViewDelegate.hpp


+ 2 - 2
proj.ios_mac/demo.xcodeproj/project.pbxproj

@@ -396,8 +396,6 @@
 				C17946152CC7502600779B63 /* IAPTestCard.cpp */,
 				C18082272CCB3338009DE140 /* IAPCardView.hpp */,
 				C18082262CCB3338009DE140 /* IAPCardView.cpp */,
-				C18082322CCB71D3009DE140 /* IAPTestCardViewDelegate.hpp */,
-				C18082312CCB71D3009DE140 /* IAPTestCardViewDelegate.cpp */,
 			);
 			path = Shop;
 			sourceTree = "<group>";
@@ -464,6 +462,8 @@
 				46880B8419C43A87006E1F66 /* AppDelegate.cpp */,
 				C17ACCC52CB904460072A711 /* TestScene.h */,
 				C17ACCBB2CB903BA0072A711 /* TestScene.cpp */,
+				C18082322CCB71D3009DE140 /* IAPTestCardViewDelegate.hpp */,
+				C18082312CCB71D3009DE140 /* IAPTestCardViewDelegate.cpp */,
 			);
 			name = Classes;
 			path = ../Classes;