cocos2d-iPhone
912sy.com
这个作者很懒,什么都没留下…
展开
-
Use Retina Graphics In iPad
Very easy:in ccFileUtils.m search for+(NSString*) getDoubleResolutionImage:(NSString*)pathand change the lineif( CC_CONTENT_SCALE_FACTOR() == 2)for the lineif( CC_CONTENT_SCALE_FACTO原创 2013-04-24 19:13:26 · 632 阅读 · 0 评论 -
解决滚屏背景/拼接地图有黑边(缝隙)
如果解决拼接裂缝问题利用下面这行代码还是不给力的话 :[sprite.texture setAliasTexParameters];那么请继续利用下面这行代码:(放在AppDelegate.m 的applicationDidFinishLaunching方法中最后即可)[[CCDirector sharedDirector] setProjection:kC原创 2020-08-10 10:34:00 · 684 阅读 · 0 评论 -
TMX Retina Display
For anyone trying to make this retina-compatible, here's what I did:1) You'll need 2 sets of files. Cocos2d will automatically use the HD files if they are named properly:TileMap.tmx (50x5原创 2020-08-10 10:27:05 · 811 阅读 · 0 评论 -
如何优化cocos2d程序的内存使用和程序大小:part-1
译者:在我完成第一个游戏项目的时候,我深切地意识到“使用cocos2d来制作游戏的开发者们,他们大多会被cocos2d的内存问题所困扰”。而我刚开始接触cocos2d的时候,社区里面的人们讨论了一个非常有意义的话题:“请简单地讲述你认为新手cocos2d程序员在他开始编码之前,最应该先知道,或者应该关注和注意的事项。”这个问题的答案很多,有人讲是“如何加载和保存游戏数据”,有人讲的是“如何实现原创 2020-08-10 10:26:29 · 622 阅读 · 0 评论 -
CocosBuilder & iPhone 5 Resolution
CocosBuilder and cocos2d-iphone both now have support for the new iPhone 5 resolution, but when using CocosBuilder and fixed sized background images you still need to do a little custom coding as coco原创 2020-08-10 10:23:22 · 1316 阅读 · 0 评论 -
利用CCProgressTimer 实现自定义游戏血量条
这几天在做自己游戏项目中的血量条,分享下我自己的血量条插件通过翻查网站,发现COCOS2D已经提供了一个接近效果的封装,CCProgressTimer首先介绍下CCProgressTimer它是一个基础进度条,能够支持若干种进度条样式,包括圆形进度条,条形进度条,根据一个百分比属性,实现显示/隐藏进度条的部分,达到图形化显示进度的作用。优点:- 继承自CCN原创 2013-05-20 16:57:30 · 847 阅读 · 0 评论 -
CCprogressTimer
Lets talk about the major changes:Instantiation:+ (id) progressWithSprite:(CCSprite*) sprite;- (id) initWithSprite:(CCSprite*) sprite;You can now do that by passing a sprite and that sprit原创 2020-08-10 10:19:44 · 526 阅读 · 0 评论 -
EXTENDING COCOS2D CCSPRITE TO HANDLE TOUCHES
Extending CCSprite Makes My Life EasierWhile developing a couple of games that I am currently working on I ended up finding a need to have a CCSprite that would trigger a particular selector. I wa原创 2013-06-01 18:49:57 · 566 阅读 · 0 评论 -
如何优化cocos2d程序的内存使用和程序大小:part-2
减少你的程序的大小把纹理的颜色位深度减少到16位,不仅可以减少内存压力,还可以有效地减少程序的体积。但是,我们还有其它方法可以更进一步地减少程序的大小。TexturePacker PNG 图片优化如果你有某些原因,让你坚持要使用PNG文件格式而不是我之前极力向你推荐的pvr.ccz文件格式,那么TexturePacker有一个选项,叫做“Png Opt Level原创 2020-08-10 10:25:19 · 546 阅读 · 0 评论