02 2010 档案

摘要:1.readonly表示这个属性是只读的,就是只生成getter方法,不会生成setter方法.2.readwrite,设置可供访问级别3.retain,是说明该属性在赋值的时候,先release之前的值,然后再赋新值给属性,引用再加1。4.nonatomic,非原子性访问,不加同步,多线程并发访问会提高性能。注意,如果不加此属性,则默认是两个访问方法都为原子型事务访问。@property(non... 阅读全文
posted @ 2010-02-24 15:11 AlexLiu 阅读(2646) 评论(4) 推荐(0)
摘要:Integrating OpenFeint with Cocos2D-iPhone ApplicationsOpenFeint is a service that enables your iPhone/iPod Touch application the ability to provide online score tracking. The service is free and can e... 阅读全文
posted @ 2010-02-24 11:17 AlexLiu 阅读(1739) 评论(1) 推荐(1)
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--//以上这两行是.h文件的定义Label*label;@property(nonatomic,retain)Label*label;//这里来到.m文件@synthesizelabel;@imple... 阅读全文
posted @ 2010-02-23 17:44 AlexLiu 阅读(1213) 评论(0) 推荐(0)
摘要:接上文,稍微底层一点的函数,我们对此进行简单的封装,以至于可以更加方便的使用。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--staticGBMusicTrack*track;staticNSMutableDictionary*trackFiles... 阅读全文
posted @ 2010-02-23 16:35 AlexLiu 阅读(913) 评论(1) 推荐(0)
摘要:首先需要引入AudioTool 这个framework代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/---(id)initWithPath:(NSString*)path{UInt32size,maxPacketSize;char*cookie;i... 阅读全文
posted @ 2010-02-23 14:53 AlexLiu 阅读(1849) 评论(3) 推荐(0)
摘要:分享两段Objective - C实现单例模式的code貌似在MAC开发里面很少有人提及设计模式。。。至少还没有看到用Objective —C实现什么设计模式的。。。代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--staticData... 阅读全文
posted @ 2010-02-21 16:14 AlexLiu 阅读(3268) 评论(2) 推荐(0)
摘要:Tiled MapsThere 2 ways of creating tiled maps in cocos2d.by using the TMX Tile Map format (newer, more flexible, recommended)by using the PGU Tile Map format (older, deprecated)TMX Tile Map formatSinc... 阅读全文
posted @ 2010-02-08 23:22 AlexLiu 阅读(1037) 评论(0) 推荐(0)
摘要:Labels and Fonts 标签和字体Introduction 介绍cocos2d 支持 TTF (True Type Fonts) 标签和纹理 atlas 标签.Pros and Cons of TTF labels: (Label)+ All the pros of TTF fonts: any size, kerning support, etc.+ 简单实用,不需要外部编辑器.- 创... 阅读全文
posted @ 2010-02-08 22:29 AlexLiu 阅读(3608) 评论(0) 推荐(0)
摘要:cocos2d Best PracticesImproving performance提高性能使用这个向导: performance tests在Xcode中关闭thumb编辑Thumb 代码要比non-thumb代码慢很多Director:使用FastDirector. FastDirector不需要垂直同步. 要比普通的Director快很多// must be called before a... 阅读全文
posted @ 2010-02-05 21:49 AlexLiu 阅读(2997) 评论(1) 推荐(1)