cocos2dx-store-example is an example project demonstrating usage and implementation of SOOMLA's cocos2dx-store.
This project contains examples for implementing all of SOOMLA's interfaces and using SOOMLA's various services. Read up on what you can do with SOOMLA in this wiki (the wiki is for Android but it applies to all the projects under The SOOMLA Project).
-
Obtain the Cocos2d-x framework either from git or from the Cocos2d-x website. Make sure to use the latest stable version (v2.2 as of Oct 25 2013).
$ git clone [email protected]:cocos2d/cocos2d-x.git
-
Recursively clone our cocos2dx-store library into the
extensions
directory in the root of your Cocos2d-x framework.$ cd cocos2dx $ git clone --recursive [email protected]:soomla/cocos2dx-store.git extensions/cocos2dx-store
-
Clone our fork of the janssen library into the
external
directory in the root of your Cocos2d-x framework.$ git clone [email protected]:vedi/jansson.git external/jansson
-
Clone cocos2dx-store-example into the
projects
directory at the root of the Cocos2d-x framework.$ git clone [email protected]:soomla/cocos2dx-store-example.git projects/cocos2dx-store-example
-
Run the
build_native.sh
script located in projects/cocos2dx-store-example/proj.android. This step should take a while.$ cd projects/cocos2dx-store-example/proj.android $ ./build_native.sh
-
Finally, open the
proj.android
directory located incocos2dx-store-example
in Android Studio (IntelliJ IDEA).proj.android
is an Android Studio project. -
Build the project, run ExampleActivity, and you're ready to go! The application should launch in an emulator or on your device.
Take a look around, and get a feel for all you can do with cocos2dx-store.
- Open the XCode project under
proj.ios
. - Build the project, run it, and you're ready to go! The application should launch in the simulator or on your device.
Take a look around, and get a feel for all you can do with cocos2dx-store.
A good example of how to define an economy model can be found in MuffinRushAssets.
Take a look at that file and see how you can define your specific game's economy.
This project contains three main scenes: MainScene, StoreAScene, and StoreBScene. They are all built with CocosBuilder
- MainScene: serves as an entry point to the store, use it as a reference how to enter the store in your app.
- StoreAScene: contains all of the PurchaseWithVirtualItem items and allows the user to buy them.
- StoreBScene: contains all of the PurchaseWithMarket items and allows the user to buy them.
MIT License. Copyright (c) 2012 SOOMLA. http://project.soom.la