Przeglądaj źródła

添加了商店显示活动卡片的实现

MoYuWang 9 miesięcy temu
rodzic
commit
39583c950b

+ 5 - 1
Classes/IAP/IAPCtlShop.cpp

@@ -60,6 +60,10 @@ void IAPCtlShop::removePlacement(const std::string &id){
     IAPCtlShopUI::getInstance()->removePlacement(id);
 }
 
+bool IAPCtlShop::addCardToPlacement(const std::string &id, IAPCard *card){
+    IAPCtlShopUI::getInstance()->addCardToPlacement(id, card);
+}
+
 void IAPCtlShop::clearPlacement(){
     IAPCtlShopUI::getInstance()->clearPlacement();
 }
@@ -74,7 +78,7 @@ void IAPCtlShop::showInNode(cocos2d::Node *pParent, ShopRequirement &requirement
 }
 
 void IAPCtlShop::showPlacementsInNode(cocos2d::Node *pParent, const vector<std::string> &plIds){
-    
+    IAPCtlShopUI::getInstance()->showPlacementsInNode(pParent, plIds);
 }
 
 UserBuyType IAPCtlShop::getUserBuyType(){

+ 3 - 0
Classes/IAP/IAPCtlShop.hpp

@@ -54,6 +54,9 @@ public:
     // id 卡片id(添加版位时的id)
     void removePlacement(const std::string& id);
     
+    // 给某个商店版位添加卡片
+    bool addCardToPlacement(const std::string& id, IAPCard* card);
+    
     // 清空活动
     void clearPlacement();
     

+ 5 - 0
Classes/IAP/IAPDefine.hpp

@@ -28,12 +28,17 @@ public:
     
     // 释放
     virtual void release() = 0;
+    
+    // 获取卡片大小
+    virtual cocos2d::Size getSize() = 0;
 };
 
 // 在商店中的一个活动版位
 typedef struct {
     std::string id;
     std::vector<IAPCard*> cards;
+    
+    std::string priority;   // 活动优先级
 } IAPPlacement;
 
 // 显示商店时的一些要求

+ 0 - 62
Classes/IAP/Shop/IAPCtlShopActItem.cpp

@@ -1,62 +0,0 @@
-//
-//  IAPCtlShopActItem.cpp
-//  demo
-//
-//  Created by Red_mini on 2024/10/22.
-//
-
-#include "IAPCtlShopActItem.hpp"
-
-#include "IAPProcess.hpp"
-#include "IAPCtlShopUI.hpp"
-
-
-
-IAPCtlShopActItem* IAPCtlShopActItem::create(const iap::IAPPlacement& placement) {
-    IAPCtlShopActItem* csi = new IAPCtlShopActItem(placement);
-    csi->_placement = placement;
-    csi->autorelease();
-    csi->retain();
-    return csi;
-}
-
-IAPCtlShopActItem::IAPCtlShopActItem(const iap::IAPPlacement& placement)
-: _placement(placement) {
-    
-}
-
-IAPCtlShopActItem::~IAPCtlShopActItem() {
-    
-}
-
-cocos2d::Size IAPCtlShopActItem::getSize() {
-    return cocos2d::Size(584,280);
-}
-
-void IAPCtlShopActItem::onEnter(){
-    
-}
-
-bool IAPCtlShopActItem::initUI(){
-    
-    
-    return true;
-}
-
-void IAPCtlShopActItem::onNotifyDevelopment(const redutils::ReboltNotifyData& data) {
-    if (data.notify == "") {
-        
-    } else if (data.notify == "点击购买") {
-        
-    }
-}
-
-
-void IAPCtlShopActItem::accepted() {
-    // 退出购买界面,展示成功界面
-    IAPCtlShopUI::getInstance()->quit();
-}
-
-void IAPCtlShopActItem::rejected() {
-    
-}

+ 0 - 46
Classes/IAP/Shop/IAPCtlShopActItem.hpp

@@ -1,46 +0,0 @@
-//
-//  IAPCtlShopActItem.hpp
-//  demo
-//
-//  Created by Red_mini on 2024/10/22.
-//
-
-#ifndef IAPCtlShopActItem_hpp
-#define IAPCtlShopActItem_hpp
-
-#include <stdio.h>
-#include "cocos2d.h"
-#include "RUReboltLayer.h"
-#include "IAPConf.hpp"
-
-#include "IAPDefine.hpp"
-
-
-class IAPCtlShopActItem : public cocos2d::Node
-{
-public:
-    static IAPCtlShopActItem* create(const iap::IAPPlacement& placement);
-    
-    cocos2d::Size getSize();
-    
-    virtual void onEnter() override;
-    
-private:
-    IAPCtlShopActItem(const iap::IAPPlacement& placement);
-    ~IAPCtlShopActItem();
-    
-    bool initUI();
-    
-    void onNotifyDevelopment(const redutils::ReboltNotifyData&);
-    
-    void accepted();
-    void rejected();
-    
-    
-private:
-    
-    iap::IAPPlacement _placement;
-};
-
-
-#endif /* IAPCtlShopActItem_hpp */

+ 193 - 14
Classes/IAP/Shop/IAPCtlShopUI.cpp

@@ -7,12 +7,16 @@
 
 #include "IAPCtlShop.hpp"
 
+#include "ui/UIPageView.h"
+
 #include "RUUtils.h"
 #include "RUPlatform.h"
 
 #include "IAPConf.hpp"
 #include "IAPCtlShopUI.hpp"
 #include "IAPCtlShopItem.hpp"
+#include "IAPDefine.hpp"
+#include "IAPTestCard.hpp"
 #include <regex>
 
 IAPCtlShopUI* IAPCtlShopUI::_instance = nullptr;
@@ -44,6 +48,10 @@ void IAPCtlShopUI::clear() {
         gi->release();
     }
     _goodsItems.clear();
+    _placementItems.clear();
+    for(const auto& placement : _placements){
+        _indicators[placement.first].clear();
+    }
     _allSizes.clear();
     _cb = nullptr;
 }
@@ -86,20 +94,107 @@ bool IAPCtlShopUI::create(Node* pNode, IAPConf* cfg, iap::ShopRequirement& requi
     return true;
 }
 
+// (暂未完成)
+void IAPCtlShopUI::showPlacementsInNode(cocos2d::Node *pNode, const vector<std::string> &plIds){
+    clear();
+    redutils::Platform::getInstance()->reportLog("open iap");
+    
+    int index = 0;
+    _tableData.setCascadeOpacity(true);
+    _tableData.clear();
+    cocos2d::Size size = _ndScrollArea->getContentSize();
+    auto delayIdx = 0;
+    cocos2d::Vec2 offset(size.width, 0);
+    float dur = 0.4;
+    int height = 0;
+    
+    for(int i = 0; i < plIds.size(); i++){
+        if(_placements.count(plIds[i]) == 0)continue;
+        // 展示活动版位
+        bool bNeedAnim = height <= size.height;
+        Node* nd = Node::create();
+        nd->setAnchorPoint(Vec2(0.5,0.5));
+        nd->setContentSize(cocos2d::Size(584,250));
+        nd->setCascadeOpacityEnabled(true);
+        nd->setCascadeColorEnabled(true);
+        
+        auto si = createPlacementUI(_placements[plIds[i]]);
+        auto sz = cocos2d::Size(584,280);
+        cocos2d::Vec2 pos(size.width/2.0, sz.height/2.0);
+        nd->addChild(si);
+        si->setPosition(bNeedAnim ? pos+offset : pos);
+        _placementItems.push_back(nd);
+        _tableData.insertCell(index++, nd);
+        _allSizes.push_back(sz);
+        height += sz.height;
+        
+        if (bNeedAnim) {
+            // 加入动画
+            auto d = DelayTime::create(delayIdx*dur/8.0);
+            auto m = EaseBackOut::create(MoveBy::create(dur, cocos2d::Vec2(-offset.x, offset.y)));
+            si->runAction(Sequence::create(d, m, NULL));
+            delayIdx ++;
+        }
+    }
+    
+    _tableData._numberOfCellsInTableView = [=](cocos2d::extension::TableViewSmooth*)->ssize_t{
+        return _allSizes.size();
+    };
+    _tableData._tableCellSizeForIndex = [=](cocos2d::extension::TableViewSmooth*, ssize_t idx)->Size{
+        if (idx < _allSizes.size()) {
+            return _allSizes[idx];
+        } else {
+            return Size(0,0);
+        }
+    };
+    
+    // 防止拉动的时候才创建
+    _layer->scheduleOnce([=](float){
+        for (int i=0; i<_allSizes.size(); i++) {
+            _tableView->updateCellAtIndex(i);
+        }
+    }, 0.05, "SCH_Update_Cells");
+    
+    
+    _tableView = redutils::RUTableView::create(&_tableData, cocos2d::Size(size.width, size.height));
+    _tableView->setCascadeOpacityEnabled(true);
+    _tableView->setCascadeColorEnabled(true);
+    _tableView->setDirection(ScrollViewSmooth::Direction::VERTICAL);
+    _tableView->setVerticalFillOrder(TableViewSmooth::VerticalFillOrder::TOP_DOWN, false);
+    _tableView->setDelegate(&_tableData);
+    _tableView->setBounceable(true);
+//    _tableView->setOutSightClean(false);
+    _ndScrollArea->addChild(_tableView);
+}
+
 bool IAPCtlShopUI::addAPlacement(const iap::IAPPlacement &plInfo){
     // 如果该活动ID存在,则添加失败
     if(_placements.count(plInfo.id) != 0)return false;
     
     _placements[plInfo.id] = plInfo;
+    
+    std::vector<DrawNode*> drawNode;
+    _indicators[plInfo.id] = drawNode;
+    
     return true;
 }
 
 void IAPCtlShopUI::removePlacement(const std::string &id){
     _placements.erase(id);
+    
+    _indicators.erase(id);
+    
+}
+
+bool IAPCtlShopUI::addCardToPlacement(const std::string &id, iap::IAPCard *card){
+    if(_placements.count(id) == 0)return false;
+    _placements[id].cards.push_back(card);
+    return true;
 }
 
 void IAPCtlShopUI::clearPlacement(){
     _placements.clear();
+    _indicators.clear();
 }
 
 size_t IAPCtlShopUI::getPlacementCount(){
@@ -193,25 +288,34 @@ void IAPCtlShopUI::constructShopItem(bool bShowAll) {
             break;
     }
     
-    // 展示活动商品
+    // 展示活动版位
     if(_placements.size() != 0){
-        // 展示活动
+        // 展示活动版位中的活动
         for(const auto& placement : _placements){
-            if(bigPackCount <= 0)break;
-            
-            bool bNeedAnim = height <= size.height;
-            Node* nd = Node::create();
-            nd->setCascadeOpacityEnabled(true);
-            nd->setCascadeColorEnabled(true);
-            
-            // 创建活动卡片
-            auto cards = placement.second.cards;
-            for(const auto& card : cards){
-                auto si = card->create();
+            bool isShow = false;
+            if(bShowAll){
+                isShow = true;
+            }else{
+                if(bigPackCount > 0){
+                    isShow = true;
+                    bigPackCount--;
+                }
+            }
+            if(isShow){
+                // 展示活动版位
+                bool bNeedAnim = height <= size.height;
+                Node* nd = Node::create();
+                nd->setAnchorPoint(Vec2(0.5,0.5));
+                nd->setContentSize(cocos2d::Size(584,250));
+                nd->setCascadeOpacityEnabled(true);
+                nd->setCascadeColorEnabled(true);
+                
+                auto si = createPlacementUI(placement.second);
                 auto sz = cocos2d::Size(584,280);
                 cocos2d::Vec2 pos(size.width/2.0, sz.height/2.0);
                 nd->addChild(si);
                 si->setPosition(bNeedAnim ? pos+offset : pos);
+                _placementItems.push_back(nd);
                 _tableData.insertCell(index++, nd);
                 _allSizes.push_back(sz);
                 height += sz.height;
@@ -223,9 +327,9 @@ void IAPCtlShopUI::constructShopItem(bool bShowAll) {
                     si->runAction(Sequence::create(d, m, NULL));
                     delayIdx ++;
                 }
+                
             }
             
-            bigPackCount--;
         }
     }
     // 判断是否还有版位
@@ -291,6 +395,10 @@ void IAPCtlShopUI::constructShopItem(bool bShowAll) {
                     _btnShowAll = NULL;
                     _tableData.clear();
                     _goodsItems.clear();
+                    _placementItems.clear();
+                    for(const auto& placement : _placements){
+                        _indicators[placement.first].clear();
+                    }
                     _allSizes.clear();
                     constructShopItem(true);
                     _tableView->reloadData(true);
@@ -335,6 +443,77 @@ void IAPCtlShopUI::constructShopItem(bool bShowAll) {
     }, 0.05, "SCH_Update_Cells");
 }
 
+Node* IAPCtlShopUI::createPlacementUI(const iap::IAPPlacement& placement){
+    Node* node = Node::create();
+    
+    // 创建 PageView 用于分页滑动卡片
+    auto pageView = ui::PageView::create();
+    pageView->setContentSize(cocos2d::Size(584, 250));
+    
+    // 创建指示点的父节点
+    auto indicatorNode = Node::create();
+    float spacing = 20.0f; // 每个指示点之间的间距
+    
+    // 遍历 placement 中的卡片,依次创建并添加到 PageView 中
+    for (int i = 0; i < placement.cards.size(); i++) {
+        // 创建每张卡片的布局容器(PageView 只能添加 Layout 类型的子节点)
+        auto layout = ui::Layout::create();
+        layout->setContentSize(cocos2d::Size(584, 250));
+        
+        auto card = placement.cards[i]->create();  // 假设 card 有 create 方法
+        
+        // 设置卡片的居中位置
+        card->setPosition(Vec2(layout->getContentSize().width / 2, layout->getContentSize().height / 2));
+        layout->addChild(card);
+        
+        // 将布局容器添加到 PageView 中
+        pageView->addPage(layout);
+        
+        // 创建指示点
+        auto indicator = DrawNode::create();
+        Vec2 center(i * spacing, 0); // 水平排列指示点
+        _indicators[placement.id].push_back(indicator);
+        
+        // 画白色圆点
+        indicator->drawDot(center, 5, Color4F(1, 1, 1, 1)); // 白色指示点
+        indicatorNode->addChild(indicator);
+    }
+    
+    // 设置 PageView 的分页切换效果(滑动自动切换)
+    pageView->setUsingCustomScrollThreshold(true);  // 启用自定义滑动阈值
+    pageView->setCustomScrollThreshold(50);        // 设置触发翻页的滑动距离阈值
+    pageView->setAutoScrollStopEpsilon(0.05f); // 提高自动滚动停止的精度
+    
+    // 设置指示点的位置,居中显示在卡片下方
+    float indicatorNodeWidth = (placement.cards.size() - 1) * spacing;
+    indicatorNode->setPosition(Vec2(pageView->getContentSize().width / 2 - indicatorNodeWidth / 2, 0)); // 调整y轴位置
+    node->addChild(indicatorNode);  // 将指示点容器添加到主节点中
+
+    // 添加回调函数监听页面变化
+    pageView->addEventListener([=](Ref* sender, ui::PageView::EventType type) {
+        if (type == ui::PageView::EventType::TURNING) {
+            log("滑动");
+            auto pageView = dynamic_cast<ui::PageView*>(sender);
+            int currentPageIndex = pageView->getCurrentPageIndex();
+            
+            // 更新指示点颜色,当前页的指示点变为红色,其他保持白色
+            for (int i = 0; i < _indicators[placement.id].size(); i++) {
+                _indicators[placement.id][i]->clear(); // 清除之前的绘制
+                Color4F color = (i == currentPageIndex) ? Color4F(1, 0, 0, 1) : Color4F(1, 1, 1, 1); // 红色或白色
+                _indicators[placement.id][i]->drawDot(Vec2(i * 20, 0), 5, color); // 更新指示点颜色
+            }
+        }
+    });
+    
+    // 默认将第一页的指示点设为红色
+    _indicators[placement.id][0]->drawDot(Vec2(0, 0), 5, Color4F(1, 0, 0, 1)); // 当前页红点
+
+    // 将 PageView 添加到父节点 node 中
+    node->addChild(pageView);
+        
+    return node;
+}
+
 void IAPCtlShopUI::filterGoods(iap::ShopRequirement &requirement){
     std::map<int, bool> m;
     int cnt = 0;

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

@@ -26,6 +26,11 @@ public:
     // 在指定节点内创建
     bool create(cocos2d::Node* pNode, IAPConf* cfg, iap::ShopRequirement& requirement,int placementId = 1);
     
+    // 以滑动卡片的形式在某个节点中显示某些版位(适用于失败时的场景)
+    // pParent 父节点
+    // plIds 需要的版位id
+    void showPlacementsInNode(cocos2d::Node* pNode, const vector<std::string>& plIds);
+    
     // 添加一个商店版位
     // id 卡片id(添加版位时的id)
     bool addAPlacement(const iap::IAPPlacement& plInfo);
@@ -34,6 +39,9 @@ public:
     // id 卡片id(添加版位时的id)
     void removePlacement(const std::string& id);
     
+    // 给某个商店版位添加卡片
+    bool addCardToPlacement(const std::string& id, iap::IAPCard* card);
+    
     // 清空活动
     void clearPlacement();
     
@@ -59,6 +67,8 @@ private:
     
     void constructShopItem(bool bShowAll = false);
     
+    Node* createPlacementUI(const iap::IAPPlacement& placement);
+    
     // 根据所需要的金币进行排序筛选
     void filterGoods(iap::ShopRequirement& requirement);
     
@@ -73,6 +83,7 @@ private:
     redutils::RUTableDataModel _tableData;
     std::vector<GoodsInfo> _goodsInfo;
     std::vector<IAPCtlShopItem*> _goodsItems;
+    std::vector<Node*> _placementItems;
     redutils::RUReboltLayer* _btnShowAll = nullptr;
     std::vector<cocos2d::Size> _allSizes;
     MapIGCoin* _igCoin = nullptr;
@@ -81,6 +92,7 @@ private:
     int _placementId = 0;
     
     std::map<std::string, iap::IAPPlacement> _placements;
+    std::map<std::string, std::vector<DrawNode*> > _indicators;
 };
 
 #endif /* IAPCtlShopUI_hpp */

+ 85 - 0
Classes/IAP/Shop/IAPTestCard.cpp

@@ -0,0 +1,85 @@
+//
+//  IAPCtlShopActItem.cpp
+//  demo
+//
+//  Created by Red_mini on 2024/10/22.
+//
+
+#include "IAPTestCard.hpp"
+
+#include "IAPProcess.hpp"
+#include "IAPCtlShopUI.hpp"
+
+
+IAPTestCard::IAPTestCard(){
+    _redName = "内购版位_活动模版.redream";
+    
+    _title = "activity";
+    _background = "内购版位_活动模版_底板_插图底板.png";
+    _gameUIName = "gameMapUI.plist";
+    _buttonLabel = "$ 0.99";
+    
+}
+
+Node* IAPTestCard::create() {
+    Node* node = Node::create();
+    
+    node->setCascadeOpacityEnabled(true);
+    node->setCascadeColorEnabled(true);
+    redutils::iterateNode(node, [](Node* nd){
+        nd->setCascadeOpacityEnabled(true);
+        nd->setCascadeColorEnabled(true);
+    });
+    
+    node->addChild(createLayer());
+    
+    return node;
+}
+
+void IAPTestCard::setCbWhileClicked(std::function<void ()> cb){
+    
+}
+
+void IAPTestCard::release(){
+    
+}
+
+
+cocos2d::Size IAPTestCard::getSize() {
+    return cocos2d::Size(584,280);
+}
+
+redutils::RUReboltLayer* IAPTestCard::createLayer(){
+    
+    auto layer = redutils::RUReboltLayer::createReboltLayer(_redName);
+    
+    layer->setCoderDataVar("P-标题", _title);
+    layer->setCoderDataVar("P-背景图片", _background);
+    layer->setCoderDataVar("P-图集名称", _gameUIName);
+    layer->setCoderDataVar("P-按钮文字", _buttonLabel);
+    
+    layer->registerOnNotify([this](const redutils::ReboltNotifyData& data){
+        onNotifyDevelopment(data);
+    });
+    layer->runBehaviacWhitFunName("初始化");
+    
+    return layer;
+}
+
+void IAPTestCard::onNotifyDevelopment(const redutils::ReboltNotifyData& data) {
+    if (data.notify == "") {
+        
+    } else if (data.notify == "点击购买") {
+        
+    }
+}
+
+
+void IAPTestCard::accepted() {
+    // 退出购买界面,展示成功界面
+    IAPCtlShopUI::getInstance()->quit();
+}
+
+void IAPTestCard::rejected() {
+    
+}

+ 55 - 0
Classes/IAP/Shop/IAPTestCard.hpp

@@ -0,0 +1,55 @@
+//
+//  IAPCtlShopActItem.hpp
+//  demo
+//
+//  Created by Red_mini on 2024/10/22.
+//
+
+#ifndef IAPCtlShopActItem_hpp
+#define IAPCtlShopActItem_hpp
+
+#include <stdio.h>
+#include "cocos2d.h"
+#include "RUReboltLayer.h"
+#include "IAPConf.hpp"
+
+#include "IAPDefine.hpp"
+
+
+class IAPTestCard : public iap::IAPCard
+{
+public:
+    IAPTestCard();
+    
+    // 创建一个实例节点
+    virtual Node* create() override;
+    
+    // 设置点击回调
+    virtual void setCbWhileClicked(std::function<void()> cb) override;
+    
+    // 释放
+    virtual void release() override;
+    
+    virtual cocos2d::Size getSize() override;
+    
+private:
+
+    redutils::RUReboltLayer* createLayer();
+    
+    void onNotifyDevelopment(const redutils::ReboltNotifyData&);
+    
+    void accepted();
+    void rejected();
+    
+    
+private:
+    std::string _redName;          // redream名称
+    std::string _title;            // P-标题
+    std::string _background;       // P-背景图片
+    std::string _gameUIName;       // P-图集名称
+    std::string _buttonLabel;      // P-按钮文字
+    
+};
+
+
+#endif /* IAPCtlShopActItem_hpp */

+ 6 - 0
Classes/IAP/User/IAPUserData.cpp

@@ -27,6 +27,12 @@ void IAPUserData::addBuyInfo(std::string commodityID){
     _buyInfos.push_back(commodityID);
 }
 
+void IAPUserData::addBuyInfo(std::vector<std::string> commodityIDs){
+    for(const auto& commodityID : commodityIDs){
+        _buyInfos.push_back(commodityID);
+    }
+}
+
 void IAPUserData::clearBuyInfo(){
     _buyInfos.clear();
 }

+ 1 - 0
Classes/IAP/User/IAPUserData.hpp

@@ -23,6 +23,7 @@ public:
     // 添加购买信息
     // 参数说明 : 商品id
     void addBuyInfo(std::string commodityID);
+    void addBuyInfo(std::vector<std::string> commodityIDs);
     
     // 获取用户购买记录
     std::vector<std::string> getBuyInfos();

+ 23 - 3
Classes/TestScene.cpp

@@ -11,6 +11,8 @@
 #include "IAPCtlShop.hpp"
 #include "IAPDefine.hpp"
 
+#include "IAPTestCard.hpp"
+
 USING_NS_CC;
 
 Scene* TestScene::createScene(){
@@ -34,12 +36,30 @@ bool TestScene::init(){
     _iapShop = iap::IAPCtlShop::createWith();
     _iapShop->init(cfgFN);
     
-//    iap::IAPPlacement plInfo;
-//    plInfo.id = "1";
+    iap::IAPPlacement plInfo;
+    plInfo.id = "1";
+    IAPTestCard* testCard = new IAPTestCard();
+    IAPTestCard* testCard2 = new IAPTestCard();
+    plInfo.cards.push_back(testCard);
+    plInfo.cards.push_back(testCard2);
+    
+    _iapShop->addAPlacement(plInfo);
+    
+    // 第二个版位
+    
 //    iap::IAPPlacement plInfo2;
 //    plInfo2.id = "2";
-//    _iapShop->addAPlacement(plInfo);
+//    IAPTestCard* testCard3 = new IAPTestCard();
+//    IAPTestCard* testCard4 = new IAPTestCard();
+//    plInfo2.cards.push_back(testCard3);
+//    plInfo2.cards.push_back(testCard4);
+//    
 //    _iapShop->addAPlacement(plInfo2);
+    
+    
+    IAPTestCard* testCard5 = new IAPTestCard();
+    _iapShop->addCardToPlacement(plInfo.id, testCard5);
+    
     // 在此处添加场景初始化的代码,比如创建背景、角色、UI等
     createBoard();
     schedule(CC_SCHEDULE_SELECTOR(TestScene::update), 1.0f);

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

@@ -51,8 +51,8 @@
 		8262943E1AAF051F00CB7CF7 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8262943D1AAF051F00CB7CF7 /* Security.framework */; };
 		BF0045D6B142DBAA2FDD68D6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9E14807A8C8CC4A87B4DCD8 /* WebKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
 		BF1C47F01293687400B63C5D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1C47EA1293683800B63C5D /* QuartzCore.framework */; };
-		C17946172CC7502600779B63 /* IAPCtlShopActItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C17946152CC7502600779B63 /* IAPCtlShopActItem.cpp */; };
-		C17946182CC7502600779B63 /* IAPCtlShopActItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C17946152CC7502600779B63 /* IAPCtlShopActItem.cpp */; };
+		C17946172CC7502600779B63 /* IAPTestCard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C17946152CC7502600779B63 /* IAPTestCard.cpp */; };
+		C17946182CC7502600779B63 /* IAPTestCard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C17946152CC7502600779B63 /* IAPTestCard.cpp */; };
 		C17ACCBC2CB903BA0072A711 /* TestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C17ACCBB2CB903BA0072A711 /* TestScene.cpp */; };
 		C17ACCBD2CB903BA0072A711 /* TestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C17ACCBB2CB903BA0072A711 /* TestScene.cpp */; };
 		D44C620C132DFF330009C878 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D44C620B132DFF330009C878 /* OpenAL.framework */; };
@@ -192,8 +192,8 @@
 		5087E78A17EB975400C73F5D /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
 		8262943D1AAF051F00CB7CF7 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
 		BF1C47EA1293683800B63C5D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		C17946152CC7502600779B63 /* IAPCtlShopActItem.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = IAPCtlShopActItem.cpp; sourceTree = "<group>"; };
-		C17946162CC7502600779B63 /* IAPCtlShopActItem.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = IAPCtlShopActItem.hpp; sourceTree = "<group>"; };
+		C17946152CC7502600779B63 /* IAPTestCard.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = IAPTestCard.cpp; sourceTree = "<group>"; };
+		C17946162CC7502600779B63 /* IAPTestCard.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = IAPTestCard.hpp; sourceTree = "<group>"; };
 		C17ACCBB2CB903BA0072A711 /* TestScene.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TestScene.cpp; sourceTree = "<group>"; };
 		C17ACCC52CB904460072A711 /* TestScene.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestScene.h; sourceTree = "<group>"; };
 		D44C620B132DFF330009C878 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
@@ -384,8 +384,8 @@
 				2F15C5E12CB8F65A0057855D /* IAPCtlShopUI.cpp */,
 				2F15C5E22CB8F65A0057855D /* IAPCtlShopItem.hpp */,
 				2F15C5E52CB8F65A0057855D /* IAPCtlShopItem.cpp */,
-				C17946162CC7502600779B63 /* IAPCtlShopActItem.hpp */,
-				C17946152CC7502600779B63 /* IAPCtlShopActItem.cpp */,
+				C17946162CC7502600779B63 /* IAPTestCard.hpp */,
+				C17946152CC7502600779B63 /* IAPTestCard.cpp */,
 			);
 			path = Shop;
 			sourceTree = "<group>";
@@ -720,7 +720,7 @@
 			files = (
 				2F15E2422CB52B0F00082BF8 /* IAPUtils.cpp in Sources */,
 				46880B8819C43A87006E1F66 /* AppDelegate.cpp in Sources */,
-				C17946172CC7502600779B63 /* IAPCtlShopActItem.cpp in Sources */,
+				C17946172CC7502600779B63 /* IAPTestCard.cpp in Sources */,
 				E4D223422BD667D4006F1F8D /* AdUtilsVideo.cpp in Sources */,
 				2F15E2402CB52B0F00082BF8 /* IAPProductInfo.cpp in Sources */,
 				E4D223482BD667E8006F1F8D /* AdUtils.cpp in Sources */,
@@ -747,7 +747,7 @@
 				2F15C5F92CB8F65A0057855D /* IAPDelegate.cpp in Sources */,
 				E4D223492BD667E8006F1F8D /* AdUtils.cpp in Sources */,
 				2F15C5F72CB8F65A0057855D /* IAPCtlShopItem.cpp in Sources */,
-				C17946182CC7502600779B63 /* IAPCtlShopActItem.cpp in Sources */,
+				C17946182CC7502600779B63 /* IAPTestCard.cpp in Sources */,
 				E4D223502BD66CDE006F1F8D /* RedWise.cpp in Sources */,
 				184505681E2E5BD700EF4807 /* main.cpp in Sources */,
 				2F15E2432CB52B0F00082BF8 /* IAPUtils.cpp in Sources */,