Cocos2D-X《欢乐麻将》手游完整源码

所属分类:游戏
开发工具:Visual C++
文件大小:16611KB
下载次数:19
上传日期:2017-07-22 12:17:21
上 传 者风间水月
说明:  游戏开发帮助,给新手开发最好的帮助,可以用来学习,用到COCOS2DX开发
(Game development help, to develop the best help for novices, can be used to study, use COCOS2DX development)

文件列表:
欢乐麻将\xzmj2\Classes\AppDelegate.cpp (3258, 2014-07-09)
欢乐麻将\xzmj2\Classes\AppDelegate.h (1110, 2014-07-08)
欢乐麻将\xzmj2\Classes\AppMacros.cpp (4394, 2014-06-22)
欢乐麻将\xzmj2\Classes\AppMacros.h (2862, 2014-01-08)
欢乐麻将\xzmj2\Classes\CallJni.cpp (2012, 2014-07-08)
欢乐麻将\xzmj2\Classes\CallJni.h (482, 2014-07-08)
欢乐麻将\xzmj2\Classes\Common\CommonFunction.cpp (97038, 2014-07-06)
欢乐麻将\xzmj2\Classes\Common\CommonFunction.h (8102, 2014-06-27)
欢乐麻将\xzmj2\Classes\Common\ConstantDef.h (60029, 2014-06-30)
欢乐麻将\xzmj2\Classes\Common\md5.cpp (9410, 2013-08-09)
欢乐麻将\xzmj2\Classes\Common\md5.h (1396, 2013-08-09)
欢乐麻将\xzmj2\Classes\Common\MyTinyXmlParser.cpp (14310, 2014-01-07)
欢乐麻将\xzmj2\Classes\Common\MyTinyXmlParser.h (840, 2014-01-06)
欢乐麻将\xzmj2\Classes\Entity\DeskEntity.cpp (219, 2013-08-09)
欢乐麻将\xzmj2\Classes\Entity\DeskEntity.h (820, 2013-08-09)
欢乐麻将\xzmj2\Classes\GameCore\AI\Robot.cpp (30472, 2014-01-03)
欢乐麻将\xzmj2\Classes\GameCore\AI\Robot.h (3358, 2014-01-03)
欢乐麻将\xzmj2\Classes\GameCore\ClientCommon.h (8537, 2014-01-03)
欢乐麻将\xzmj2\Classes\GameCore\ClientFrameDefs.h (4811, 2014-01-03)
欢乐麻将\xzmj2\Classes\GameCore\ClientMjDefs.h (13268, 2013-08-09)
欢乐麻将\xzmj2\Classes\GameCore\ClientScoreDefs.h (1977, 2014-01-03)
欢乐麻将\xzmj2\Classes\GameCore\GameLogical.cpp (190666, 2014-01-03)
欢乐麻将\xzmj2\Classes\GameCore\GameLogical.h (15752, 2014-01-03)
欢乐麻将\xzmj2\Classes\GameCore\MjDef.h (11356, 2014-06-27)
欢乐麻将\xzmj2\Classes\GameCore\RuleGen\RuleDef.h (1014, 2013-08-09)
欢乐麻将\xzmj2\Classes\GameCore\ServerFrameDefs.h (6018, 2014-01-03)
欢乐麻将\xzmj2\Classes\GameCore\TypeDef.h (706, 2014-01-02)
欢乐麻将\xzmj2\Classes\HelloWorldScene.cpp (2842, 2013-09-26)
欢乐麻将\xzmj2\Classes\HelloWorldScene.h (604, 2013-09-23)
欢乐麻将\xzmj2\Classes\Layer\GameCjLayer.cpp (5316, 2014-01-07)
欢乐麻将\xzmj2\Classes\Layer\GameCjLayer.h (1487, 2014-01-06)
欢乐麻将\xzmj2\Classes\Layer\GameDesk.cpp (32490, 2014-06-28)
欢乐麻将\xzmj2\Classes\Layer\GameDesk.h (4725, 2014-01-06)
欢乐麻将\xzmj2\Classes\Layer\GameHelp.cpp (1817, 2014-06-30)
欢乐麻将\xzmj2\Classes\Layer\GameHelp.h (606, 2014-01-06)
欢乐麻将\xzmj2\Classes\Layer\GameMenu.cpp (27490, 2014-06-28)
欢乐麻将\xzmj2\Classes\Layer\GameMenu.h (4069, 2014-01-06)
欢乐麻将\xzmj2\Classes\Layer\GameMessage.cpp (5779, 2014-06-28)
欢乐麻将\xzmj2\Classes\Layer\GameMessage.h (1146, 2014-01-06)
欢乐麻将\xzmj2\Classes\Layer\GameMGLayer.cpp (5340, 2014-01-07)
... ...

## Prerequisites: * Android NDK * Android SDK **OR** Eclipse ADT Bundle * Android AVD target installed ## Building project There are two ways of building Android projects. 1. Eclipse 2. Command Line ### Import Project in Eclipse #### Features: 1. Complete workflow from Eclipse, including: * Build C++. * Clean C++. * Build and Run whole project. * Logcat view. * Debug Java code. * Javascript editor. * Project management. 2. True C++ editing, including: * Code completion. * Jump to definition. * Refactoring tools etc. * Quick open C++ files. #### Setup Eclipse Environment (only once) **NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. 1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) **OR** Install Eclipse with Java. Add ADT and CDT plugins. 2. Only for Windows 1. Install [Cygwin](http://www.cygwin.com/) with make (select make package from the list during the install). 2. Add `Cygwin\bin` directory to system PATH variable. 3. Add this line `none /cygdrive cygdrive binary,noacl,posix=0,user 0 0` to `Cygwin\etc\fstab` file. 3. Set up Variables: 1. Path Variable `COCOS2DX`: * Eclipse->Preferences->General->Workspace->**Linked Resources** * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) 2. C/C++ Environment Variable `NDK_ROOT`: * Eclipse->Preferences->C/C++->Build->**Environment**. * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) * Only for Windows: Add new variables **CYGWIN** with value `nodosfilewarning` and **SHELLOPTS** with value `igncr` 4. Import libcocos2dx library project: 1. File->New->Project->Android Project From Existing Code. 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. 3. Click **Finish** to add project. #### Adding and running from Eclipse ![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) 1. File->New->Project->Android Project From Existing Code 2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` 3. Add the project 4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. ### Running project from Command Line $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ $ export NDK_ROOT=/path/to/ndk $ ./build_native.sh $ ant debug install If the last command results in sdk.dir missing error then do: $ android list target $ android update project -p . -t (id from step 6) $ android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6)

近期下载者

相关文件


收藏者