Cocos2d: Difference between ccp and CGPointMake?
In Cocos2d, many things require a.. point. Or position. I have used both ccp and CGPointMake methods, and both have worked just fine for me.
However, I've seen, in some tutorials, that people use one or both of them in all开发者_StackOverflow社区 their examples. So I'm not sure if there's an actual difference (because if there wasn't a difference, I'd just use the quick method ccp).
Nope no difference except CGPointMake is harder to type:
#define ccp(__X__, __Y__) CGPointMake(__X__,__Y__)
Found here:
http://www.cocos2d-iphone.org/api-ref/0.99.3/_c_g_point_extension_8h_source.html
精彩评论