28 May 2015

如何在iPhone模拟器上运行Cocos2d-x Test 项目


下载源代码。

地址为:http://cn.cocos2d-x.org/download/

Mac 地址:http://www.cocos2d-x.org/filedown/cocos2d-x-3.6.zip

  1. clone the repo from GitHub.

      $ git clone git@github.com:cocos2d/cocos2d-x.git
    
  2. After cloning the repo, please execute download-deps.py to download and install dependencies.

      $ cd cocos2d-x
      $ python download-deps.py
    
  3. After running download-deps.py.

      $ cd cocos2d-x
      $ git submodule update --init
    

Running Tests


Select the test you want from Xcode Scheme chooser.

For OS X / iOS

$ cd cocos2d-x/build
$ open cocos2d_tests.xcodeproj

说明


样本代码已经在以下环境下测试:

机器名称 | MacBook Air 操作系统 | OS X Yosemite 10.10.3 (14D136) Xcode版本 | Xcode 6.3.2 iOS | SDK 8.3

测试界面


  • cpp_empty_test_iOS

酷!整个测试样例很快就会出现!

cpp_empty_test_iOS

  • cpp_test_iOS

cpp_test_iOS

恭喜选择C++!很快你就能在iPhone中用C++编写Cocos2d游戏了。



blog comments powered by Disqus