• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

cocos2d-console: Cocos2d-console is a command line tool that lets you create, ru ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

cocos2d-console

开源软件地址:

https://gitee.com/SunLightJuly/cocos2d-console

开源软件介绍:

cocos2d-console

Cocos2d-console is a command line tool that lets you create, run, publish, debug, etc… your game. It is the swiss-army knife for cocos2d.

##Installcocos2d-console will be distributed with cocos2d-x 3.0 and up and will be automatically configured with it's install process.

##Example

# starts a new project called "MyGame"$ cocos new MyGame -l cpp -p org.cocos2d.mygame$ cd MyGame# Deploy the project to android device$ cocos run -p android

Devel Info

Internals

cocos.py is an script whose only responsability is to call its plugins.cocos.bat will invoke cocos.py on windowscocos will invoke cocos.py on Mac OS X and linux

To get a list of all the registered plugins:

$ cocos

To run the "new" plugin:

$ cocos new

Adding a new plugin to the console

You have to edit bin/cocos2d.ini, and add the class name of your new plugin there. Let's say that you want to add a plugin that deploys the project:

# should be a subclass of CCPluginproject_deploy.CCPluginDeploy

And now you have to create a file called project_deploy.py in the plugins folder.A new, empty plugin, would look like the code shown below:

import cocos# Plugins should be a sublass of CCPluginclass CCPluginDeploy(cocos.CCPlugin):		# in default category        @staticmethod        def plugin_category():          return ""        @staticmethod        def plugin_name():          return "deploy"        @staticmethod        def brief_description():            return "Deploy the project to target."        def run(self, argv, dependencies):            print "plugin called!"            print argv

Plugins are divided by category, depending on it's function: project, engine, ...

The plugins of project is in default category, it's an empty stirng "".

Comands Required

Please see this issue


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
vbanext: vbanext 核心。功能强大的在线GBA模拟器发布时间:2022-03-25
下一篇:
minesweeper: 高仿windows扫雷发布时间:2022-03-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap