iOS Dev (69) 单点触摸时 Cocoa Touch API 座标转换为 OpenGL 座标

iOS Dev (69) 单点触摸时 Cocoa Touch API 座标转换为 OpenGL 座标

  • 博客:http://blog.csdn.net/prevention
  • 作者:大锐哥
  • 摘自:Learn iPhone and iPad cocos2d Game Development

-

-(CGPoint) locationFromTouches:(NSSet *)touches
{
    UITouch *touch = [touches anyObject];
    CGPoint touchLocation = [touch locationInView: [touch view]];
    return [[CCDirector sharedDirector] convertToGL:touchLocation];
}

-

转载请注明来自:http://blog.csdn.net/prevention

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章