diff --git a/.gitignore b/.gitignore index d6f82395dd..1cbb2ba444 100644 --- a/.gitignore +++ b/.gitignore @@ -87,7 +87,3 @@ tools/tojs/user.cfg tools/tojs/userconf.ini # ... userconf.ini generated if running from tools/jenkins_scripts/mac/android/ tools/jenkins_scripts/mac/android/userconf.ini - -# Ignore files built by plugin -plugin/publish/* -plugin/tools/toolsForPublish/environment.sh diff --git a/plugin/.gitignore b/plugin/.gitignore new file mode 100644 index 0000000000..26284a528f --- /dev/null +++ b/plugin/.gitignore @@ -0,0 +1,97 @@ +# Ignore thumbnails created by windows +Thumbs.db + +# Ignore files build by Visual Studio +*.obj +*.exe +*.pdb +*.aps +*.vcproj.*.user +*.vspscc +*_i.c +*.i +*.icf +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +[Bb]in +[Dd]ebug*/ +*.sbr +*.sdf +obj/ +[Rr]elease*/ +_ReSharper*/ +[Tt]est[Rr]esult* +ipch/ +*.opensdf + +# Ignore files build by ndk and eclipse +libs/ +bin/ +obj/ +gen/ +assets/ +local.properties + +# Ignore files built by NaCl +samples/Cpp/HelloCpp/proj.nacl/Resources/ +samples/Cpp/TestCpp/proj.nacl/Resources/ +samples/Cpp/TestCpp/proj.nacl/out/ +samples/Cpp/SimpleGame/proj.nacl/Resources/ +samples/Lua/HelloLua/proj.nacl/Resources/ +samples/Lua/TestLua/proj.nacl/Resources/ + +# Ignore python compiled files +*.pyc + +# Ignore files build by airplay and marmalade +build_*_xcode/ +build_*_vc10/ + +# Ignore files build by xcode +*.mode*v* +*.pbxuser +*.xcbkptlist +*.xcscheme +*.xcworkspacedata +*.xcuserstate +xcschememanagement.plist +build/ +.DS_Store +._.* +xcuserdata/ +DerivedData/ + +# Ignore files built by bada +.Simulator-Debug/ +.Target-Debug/ +.Target-Release/ + +# Ignore files built by blackberry +Simulator/ +Device-Debug/ +Device-Release/ + +# Ignore vim swaps +*.swp + +# Ignore config files in javascript bindings generator +tools/tojs/user.cfg +# ... userconf.ini generated if running from tools/tojs +tools/tojs/userconf.ini +# ... userconf.ini generated if running from tools/jenkins_scripts/mac/android/ +tools/jenkins_scripts/mac/android/userconf.ini + +# Ignore files built by plugin +publish/* +tools/toolsForPublish/environment.sh +.settings +plugins/china* +plugins/punchbox* +samplesPrivate* diff --git a/plugin/samples/HelloIAP/Classes/HelloWorldScene.cpp b/plugin/samples/HelloIAP/Classes/HelloWorldScene.cpp index aa824e1bd2..e23b06d8b2 100644 --- a/plugin/samples/HelloIAP/Classes/HelloWorldScene.cpp +++ b/plugin/samples/HelloIAP/Classes/HelloWorldScene.cpp @@ -112,27 +112,11 @@ void HelloWorld::eventMenuCallback(CCObject* pSender) { CCMenuItemLabel* pMenuItem = (CCMenuItemLabel*)pSender; TProductInfo pInfo; - MyPurchase::MyPayMode mode = MyPurchase::eNoneMode; - - switch (pMenuItem->getTag()) - { - case TAG_PAY_BY_ALIPAY: - pInfo["productName"] = "100金币"; - pInfo["productPrice"] = "0.1"; - pInfo["productDesc"] = "100个金灿灿的游戏币哦"; - mode = MyPurchase::eAlipay; - break; - case TAG_PAY_BY_ND91: - pInfo["productName"] = "100金币"; - pInfo["productPrice"] = "0.01"; - pInfo["productDesc"] = "100个金灿灿的游戏币哦"; - pInfo["Nd91ProductId"] = "685994"; - mode = MyPurchase::eND91; - break; - default: - break; - } - + MyPurchase::MyPayMode mode = (MyPurchase::MyPayMode) (pMenuItem->getTag() - TAG_PAY_BY_ALIPAY + 1); + pInfo["productName"] = "100金币"; + pInfo["productPrice"] = "0.01"; + pInfo["productDesc"] = "100个金灿灿的游戏币哦"; + pInfo["Nd91ProductId"] = "685994"; MyPurchase::sharedPurchase()->payByMode(pInfo, mode); }