Browse Source

修改:删除无用函数

杜哥很忙 9 months ago
parent
commit
74eb411379

+ 0 - 5
Classes/IAP/IAPCtlShop.cpp

@@ -101,11 +101,6 @@ void IAPCtlShop::showInNode(cocos2d::Node *pParent, ShopRequirement &requirement
     IAPCtlShopUI::getInstance()->create(pParent, _conf, requirement);
 }
 
-void IAPCtlShop::showSlideCardsByCoinsIn(cocos2d::Node* pParent, int stillNeedCoins){
-    IAPCtlShopUI::getInstance()->showSlideCardsByCoinsIn(pParent, stillNeedCoins);
-}
-
-
 void IAPCtlShop::addUserBuyInfo(std::string commodityID){
     iapshop::IAPUserData::getInstance()->addBuyInfo(commodityID);
     if(_delegate){

+ 0 - 5
Classes/IAP/IAPCtlShop.hpp

@@ -73,11 +73,6 @@ public:
     // cardsName 内购卡片名称
     void displayFailureCardIn(cocos2d::Node*, std::vector<std::string> cardsName);
     
-    // 以滑动卡片的形式在某个节点中显示满足金币条件的所有 普通商店卡片(暂未使用)删除?
-    // pParent 父节点
-    // stillNeedCoins 距离所需要的金币数还差多少金币
-    void showSlideCardsByCoinsIn(cocos2d::Node* pParent, int stillNeedCoins);
-    
     // 添加用户购买信息 并 从delegate发送购买的道具信息
     // commodityID 购买的商店卡片ID
     void addUserBuyInfo(std::string commodityID);

+ 0 - 35
Classes/IAP/Shop/IAPCtlShopUI.cpp

@@ -99,41 +99,6 @@ bool IAPCtlShopUI::create(Node* pNode, IAPConf* cfg, iapshop::ShopRequirement& r
     return true;
 }
 
-void IAPCtlShopUI::showSlideCardsByCoinsIn(cocos2d::Node *pNode, int stillNeedCoins){
-    clear();
-    
-    IAPCardView::sDotCfg cfg;
-    cfg.hightSp = "内购版位_通用_图标_滑动点_已选中.png";
-    cfg.normalSp = "内购版位_通用_图标_滑动点_未选中.png";
-    cfg.sepWidth = 30.0f;
-    cfg.yStart = 0;
-    
-    IAPConf::getInstance()->getAllGoods(_goodsInfo);
-    float h = 0.0;
-    for(const auto& goodInfo : _goodsInfo){
-        h = std::max(h, goodInfo.sz.height);
-    }
-    
-    auto visibleSize = Director::getInstance()->getVisibleSize();
-    float width = visibleSize.width;
-    cocos2d::Size sz = cocos2d::Size(width, h + 10);
-    
-    IAPCardView* cardView = IAPCardView::create(sz, cfg);
-    cardView->setPosition(Vec2(cardView->getPosition()) + Vec2(0, 20));
-    
-    IAPTestCardViewDelegate* cardViewDelegate = new IAPTestCardViewDelegate();
-    cardView->setDelegate(cardViewDelegate);
-
-    for (const auto& goodInfo : _goodsInfo) {
-        if(goodInfo.getCoinNumber() < stillNeedCoins)continue;
-        auto item = IAPCtlShopItem::create(goodInfo, 1);
-        _failItems.push_back(item);
-        cardView->addCard(item);
-    }
-
-    pNode->addChild(cardView);
-}
-
 bool IAPCtlShopUI::addAPlacement(const iapshop::IAPPlacement &plInfo){
     // 如果该活动ID存在,则添加失败
     if(_placements.count(plInfo.id) != 0)return false;

+ 0 - 5
Classes/IAP/Shop/IAPCtlShopUI.hpp

@@ -26,11 +26,6 @@ public:
     // 在指定节点内创建
     bool create(cocos2d::Node* pNode, IAPConf* cfg, iapshop::ShopRequirement& requirement,int placementId = 1);
     
-    // 以滑动卡片的形式在某个节点中显示满足金币条件的所有商店卡片
-    // pParent 父节点
-    // stillNeedCoins 距离所需要的金币数还差多少金币
-    void showSlideCardsByCoinsIn(cocos2d::Node* pNode, int stillNeedCoins);
-    
     // 添加一个商店版位
     // id 卡片id(添加版位时的id)
     bool addAPlacement(const iapshop::IAPPlacement& plInfo);