博客园  :: 首页  :: 新随笔  :: 订阅 订阅  :: 管理

2012年6月4日

摘要: - (void) beforeDraw{ glEnable(GL_SCISSOR_TEST); const CGFloat s = [[CCDirector sharedDirector] contentScaleFactor]; const int w = 90, h = 111; glScissor(self.position.x *s + w, self.position.y * s + h, self.contentSize.width*s - 2*w, self... 阅读全文

posted @ 2012-06-04 22:10 扬名 阅读(710) 评论(0) 推荐(0) 编辑

摘要: http://www.himigame.com/iphone-cocos2d/444.html 阅读全文

posted @ 2012-06-04 21:32 扬名 阅读(200) 评论(0) 推荐(0) 编辑

摘要: 今天碰到了一个奇怪的bug,记录下。// 头文件@interface A : CCLayer...@end// 源文件@implementation A- (id)init{ if(self = [super init]){ ... [self setIsTouchEnabled:YES]; // 不等同于isTouchEnabled_ = YES }}@end问题描述:CCLayer默认遵循标准触摸协议,又在init中 执行了[self setIsTouchEnabled:YES];但是始终不能触发触摸响应函数。分析:经过调试,发现居然是CCLayer... 阅读全文

posted @ 2012-06-04 21:30 扬名 阅读(410) 评论(0) 推荐(0) 编辑