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

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