JustinWong

做纯粹的快乐的游戏

导航

2011年6月9日

摘要: 自我感觉对anchor的理解没问题了,但今天被另外一个问题纠结进去了,这里先做小总结,后面会说到那个问题。假设有一个CCSprite A,则:1. anchor是一个CGPOINT,取值在(0.0f, 0,0f) 到 (1.0f, 1.0f)之间。2. (0.0f, 0.0f)是这个CCSprite矩形区域的左下角,(1.0f, 1.0f)是右上角。3. anchor决定了这个sprite的position指的是图片中哪个部分的位置,比如anchor在(0.0f, 0.0f),position在(100, 100),则这个sprite的左下角将被放在(100, 100)。4. anchor决定 阅读全文

posted @ 2011-06-09 20:13 JustinWong 阅读(1808) 评论(0) 推荐(0)

摘要: 备忘:NSString *cfgPath = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%@Cfg.plist", themeName] ofType:nil inDirectory:nil]; NSDictionary *cfgDictionary = [NSDictionary dictionaryWithContentsOfFile:cfgPath]; 阅读全文

posted @ 2011-06-09 10:29 JustinWong 阅读(469) 评论(0) 推荐(0)