在quick-cocos2d-x中创建新工程

Create a new project

Before creating new project, make sure you have set the QUICK_COCOS2DX_ROOT environment variable to the right path, refer to:

~

Create a new project with Mac

Launch Terminal Application, come to the directory for the new project:

> cd ~/Desktop

Run create_project.sh , and specify the package name of your project:

> $QUICK_COCOS2DX_ROOT/bin/create_project.sh com.mycompany.games.game01

create_project.sh shell script will use the last part of package name as your project directory name, so the upper command will create a directory with the name game01.

After that, you can see the following result:

~

Then you can use the player to run a project. Alternatively, open a project file in the proj.ios or proj.android directory, test it on a real device.

~~

Create a new project with Windows

Similar to the Mac environment, you just run create_project.bat in the cmd.exe window.

CAUTION: Don't run create_project.bat or create_project.sh in a cygwin window

> %QUICK_COCOS2DX_ROOT%\bin\create_project.bat com.mycompany.games.game01

~~

Specify the screen orientation when creating a new project

use -o argument to specify the screen orientation, the legal value could be landscape or portrait. e.g.:

> $QUICK_COCOS2DX_ROOT/bin/create_project.sh -o landscape com.mycompany.games.game01

If you want to change the screen orientation for your existing project, please see How to set the screen orientation of the game 。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值