版权声明:本文为博主原创文章,未经博主同意不得转载。 https://blog.csdn.net/LanerGaming/article/details/24146921
好久没实用过cocos2d-x,今天下载了最新版的3.0 rc2,可是怎么没找到安装模版的脚本。后来查了readme文件才发现,已经改用python脚本生产各个平台的项目,免去了开发人员创建多平台项目的麻烦,详细安装步骤參考官网文档,详细例如以下:
(mac下已经尝试成功)
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 iscpp
andlua
-
-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.)