Cocos2d-x 学习几笔1

Cocos2d-x 学习几笔1,第1张

概述How to Start a New Cocos2d-x Game This documentation will show you how to use cocos console to create and run a new project. Runtime Requirements Android 2.3+ iOS 5.0+ OS X 10.7+ Windows 7+ Ubuntu 12. How to Start a New Cocos2d-x Game

This documentation will show you how to usecocos consoleto create and run a new project.

Runtime Requirements AndroID 2.3+ iOS 5.0+ OS X 10.7+ windows 7+ Ubuntu 12.04+ Cocos2d-x v3.0+ Software Requirements Xcode 4.6 (for iOS or Mac) gcc 4.7 for linux or AndroID. For AndroID ndk-r9 or newer is required. Visual Studio 2012 (for windows) Python 2.7.5 Create A New Project
$ cd cocos2d-x$ ./setup.py$ source ~/.bash_profile # may be ~/.bash_login or ~/.profile,depends on your environemnt$ cocos new MyGame -p com.MyCompany.MyGame -l cpp -d ~/MyCompany
MyGame: name of your project -p com.MyCompany.MyGame: package name for androID -l cpp: programming language used for the project,valID value iscppandlua -d ~/MyCompany: directory to hold your project

Folder structure of the generated project is as following:

(Note: The directory may be different when the project type is lua.)

Build And Run New Project
$ cocos run -s ~/MyCompany/MyGame -p ios
-s: directory of the new project. This Could be an absolute path or a relative path. -p: which platform to run on. Options areios,androID,249)">win32,249)">macandlinux.

(Note: You are a tmux user,you should addreattach-to-user-namespacebefore the commandcocos. For more information,please refer tothis linkfor more information.)

You can runcocos run --helpfor more detail information.

For Win32 Users

usingcmdas your shell:cd cocos2d-x-3.1.1\tools\cocos2d-console\binor to wherever you have this on your filesystem

Then execute something like:cocos.py new YourGameTitle -p com.yourcompany.gameTitle -l cpp -d C:\YourGameTitle

For linux Users

The process should be the same.

new_game.png(35.6 kB)owen,2014-04-01 09:00

folder_structure.png(112 kB) run_screen.png(346.8 kB) 总结

以上是内存溢出为你收集整理的Cocos2d-x 学习几笔1全部内容,希望文章能够帮你解决Cocos2d-x 学习几笔1所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1001673.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存