@Dubyoo
2015-06-10T18:03:28.000000Z
字数 1246
阅读 2111
cocos2d-x
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\dubyoo>d:
D:\>cd cocos2d-x-2.2.4\tools\project-creator
D:\cocos2d-x-2.2.4\tools\project-creator>python create_project.py -project SimpleGame -package com.dubyoo.sgame -language cpp
proj.ios : Done!
proj.android : Done!
proj.win32 : Done!
proj.winrt : Done!
proj.wp8 : Done!
proj.mac : Done!
proj.blackberry : Done!
proj.linux : Done!
proj.marmalade : Done!
proj.tizen : Done!
proj.wp8-xaml : Done!
New project has been created in this path: D:\cocos2d-x-2.2.4\tools\project-creator/../../projects/SimpleGame
Have Fun!
D:\cocos2d-x-2.2.4\tools\project-creator>
shared CCDirector
runWithScene
replaceScene
pushScene
popScene
pause
resume
CCDirector *pDirector = CCDirector::sharedDirector(); //单例模式创建导演,保证游戏中只有一个导演
//CCDirector::sharedDirector()->pause(); //
CCScene *scene = CCScene::node(); //创建一个新场景
/* 图层的种类 */
CCLayer
CCLayerColor //可指定颜色的图层
CCLayerGradient //渐变色的图层
CCLayerMultiplex //组合的图层
CCLayer *layer = CCLayer::node(); //创建一个图层
CCSprite *sprite = CCSprite::sriteWithFile(); //根据一个图片创建一个精灵
CCAction -> CCFiniteTimeAction -> CCActionInterval
-> CCActionInstant
-> CCRepeatForever
-> CCSpeed
-> CCFollow
CCAction *scale = CCScaleTo::actionWithDuration(1, 0.6f); //0.6秒内缩放到一倍大小