1.Cocos2d-x 整体描述和传统的游戏引擎一样,cocos2d-x作为一个2d的游戏引擎,其也有以下几大概念组成:导演(CCDiretor):在cocos2d-x引擎中,CCDirector类是整个游戏的组织和控制核心,游戏的运行规则,游戏内的CCScene(场景)、布景(CCLayer)、角...
分类:
其他好文 时间:
2015-07-16 11:37:34
阅读次数:
200
http://blog.csdn.net/ganpengjin1/article/details/19088921我们要保存当前的运行的scene的截图的话,我用到CCRenderTexture,看例子代码:[cpp]view plaincopyCCSizesize=CCDirector::shar...
分类:
其他好文 时间:
2015-05-19 10:14:16
阅读次数:
175
我们要怎样切入游戏场景呢?其实就会要用到CCScene场景切换的知识,然后场景的切换效果,也即是场景的一种过渡效果...
Cocos2d-x提供了很多场景间切换的效果,可以方便大家使用
过渡类:
//用CCTransition绕y轴翻转x轴过渡到FilipXpScene
CCDirector::sharedDirector()->replac...
分类:
其他好文 时间:
2015-05-17 15:17:57
阅读次数:
211
我先说一下我的问题,cocos2dx调用android浏览器下载新版本时,出现按钮来回闪动,我的问题是,调用android时,没有在runOnUiThread中运行。
网上的意见是在AppDelegate里面的applicationDidFinishLaunching()添加pDirector->setProjection(kCCDirectorProjection2D);和CCDirector...
分类:
移动开发 时间:
2015-05-05 10:43:38
阅读次数:
192
- (void)touchMoved:(CCTouch *)touch withEvent:(CCTouchEvent *)event { CGPoint touchPoint = [[CCDirector sharedDirector] convertToGL:[touch locationInV...
分类:
其他好文 时间:
2015-05-04 08:36:25
阅读次数:
114
Cocos2dx 中的主要概念包括:应用、导演、场景、图层、精灵、动画、动作。层次关系如下:
CCDirector(导演)
在cocos2d-x引擎中,CCDirector类是整个游戏的组织和控制核心,游戏的运行规则,游戏内的CCScene(场景)、布景(CCLayer)、角色(CCSprite)等的运动,均由CCDirector管理,其在游戏中起着指定游戏规则让游...
分类:
其他好文 时间:
2015-04-24 19:18:52
阅读次数:
178
解释:
bool CCMenu::initWithArray(CCArray* pArrayOfItems)
{
if (CCLayer::init())
{
// menu in the center of the screen
CCSize s = CCDirector::sharedDirector()->getWinSize();
...
分类:
其他好文 时间:
2015-03-20 10:55:09
阅读次数:
159
开始用CCDirector::sharedirector()->pause(); 这句话是必然的、但是用了之后 按钮的触发还是会生效。查看了一些案例有人说把所有button事件取消。也有注意说把背景截图放在一个新的scene里边。我觉得这些都太坑了。
按照开发Unity这么多年的经验 应该是在暂停窗口加一个碰撞器 把后边的button事件挡住就好了。但是查阅了很多文档,百度很多资料 也不知道...
分类:
其他好文 时间:
2015-02-05 13:38:48
阅读次数:
357
Android编译环境下,运行应用提示: ?W/dalvikvm(10375): VFY: unable to resolve static method 357: Lorg/cocos2d/nodes/CCDirector;.sharedDirector ()Lorg/cocos2d/nodes/CCDirector; ? 解决办法: bu...
分类:
移动开发 时间:
2015-02-03 01:55:48
阅读次数:
291
CCDirector Class ReferenceInherits fromCC_VIEWCONTROLLERDeclared inCCDirector.hOverviewThe director creates and handles the main Window and the Cocos2...
分类:
编程语言 时间:
2015-01-31 16:06:32
阅读次数:
175