@Dubyoo
2015-06-10T10:03:28.000000Z
字数 1246
阅读 2344
cocos2d-x
Microsoft Windows [版本 6.1.7601]版权所有 (c) 2009 Microsoft Corporation。保留所有权利。C:\Users\dubyoo>d:D:\>cd cocos2d-x-2.2.4\tools\project-creatorD:\cocos2d-x-2.2.4\tools\project-creator>python create_project.py -project SimpleGame -package com.dubyoo.sgame -language cppproj.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/SimpleGameHave Fun!D:\cocos2d-x-2.2.4\tools\project-creator>
shared CCDirectorrunWithScenereplaceScenepushScenepopScenepauseresume
CCDirector *pDirector = CCDirector::sharedDirector(); //单例模式创建导演,保证游戏中只有一个导演//CCDirector::sharedDirector()->pause(); //
CCScene *scene = CCScene::node(); //创建一个新场景
/* 图层的种类 */CCLayerCCLayerColor //可指定颜色的图层CCLayerGradient //渐变色的图层CCLayerMultiplex //组合的图层
CCLayer *layer = CCLayer::node(); //创建一个图层
CCSprite *sprite = CCSprite::sriteWithFile(); //根据一个图片创建一个精灵
CCAction -> CCFiniteTimeAction -> CCActionInterval-> CCActionInstant-> CCRepeatForever-> CCSpeed-> CCFollowCCAction *scale = CCScaleTo::actionWithDuration(1, 0.6f); //0.6秒内缩放到一倍大小