JustinWong

做纯粹的快乐的游戏

导航

2011年6月8日

摘要: 1. TexturePacker和Zwoptex是一类功能,但更为强大,。。恩,是各个方面。一般情况下,Import后即可直接Publish无需任何设置Texture大小,Apply等多余操作。支持更多的格式输出。而且还支持PVR预览。总之,一直使用Zwoptex的我,自从使用过这个之后,就不再用前者了。2. PhysicsEditor和上面的东西是一个公司的,这次是个物理编辑器,支持cocos2d+box2d等。物理属性的编辑器,之前用过VertexHelper,SpriteHelper & LevelHelper 组合。前者过于轻量了,每次还需要手动把Editor中的顶点数组拷出来 阅读全文

posted @ 2011-06-08 19:51 JustinWong 阅读(712) 评论(0) 推荐(0)

2011年6月6日

摘要: NSArray *levelList = [[[[NSFileManager alloc] init] contentsOfDirectoryAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] error:nil] pathsMatchingExtensions:[NSArray arrayWithObject:@"plist"]];// 这里只是Documents目录的 阅读全文

posted @ 2011-06-06 17:22 JustinWong 阅读(1274) 评论(1) 推荐(0)

摘要: 关卡编辑器保存关卡数据时遇到的小问题,在iPad上跑总是无法读取到,原因是需要写到Document中而不是Resource中。下面是一个Helper方法,用来生成可写路径:+(NSString *) getLocalFilePath :(NSString *)fileName { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; retur 阅读全文

posted @ 2011-06-06 10:55 JustinWong 阅读(301) 评论(0) 推荐(0)

2011年6月5日

摘要: In issue 652, a project member said:Layer need to implement both methods: ccTouches and ccTouch.The default one is ccTouches but you can modify the default behavior by overriding the "registerWithTouchDispatcher".具体做法就是在CCLayer子类中增加如下代码:-(void) registerWithTouchDispatcher { [[CCTouchDispat 阅读全文

posted @ 2011-06-05 18:55 JustinWong 阅读(1676) 评论(0) 推荐(0)

2011年5月29日

摘要: 偶然读到:#import is like#include, except that it makes sure that the same file is never included more than once. 阅读全文

posted @ 2011-05-29 23:57 JustinWong 阅读(187) 评论(0) 推荐(0)