Cocos2d
GeforceLee
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Cocos2d宏的数学解释
/** Returns opposite of point. @return CGPoint @since v0.7.2 */static inline CGPointccpNeg(const CGPoint v) //计算关于原点的对称点{ return ccp(-v.x, -v.y);}/** Calculates sum of two po原创 2011-10-28 10:07:41 · 2034 阅读 · 0 评论 -
Cocos2d中遇到的问题
1。不能重复加同一个CCSprite2。ccProgress 不能 淡入淡出原创 2011-10-26 13:46:53 · 547 阅读 · 0 评论 -
Cocos2d label对齐的锚点设置
//Left Alignment[gameBeginLabel setAnchorPoint: ccp(0, 0.5f)];// Right Alignment[gameBeginLabel setAnchorPoint: ccp(1, 0.5f)];// Top Alignment[gameBeginLabel setAnchorPoint: ccp(0.5f, 0)];原创 2011-11-04 17:20:42 · 3407 阅读 · 0 评论 -
Cocos2d中各种坐标位置关系
转自:http://blog.youkuaiyun.com/liuhongwei123888/article/details/6684279 先看一段代码:[cpp] view plaincopy-(id) init { // always call "super" init // Apple recommends转载 2012-03-23 23:52:27 · 2763 阅读 · 0 评论 -
坐标公式
CGPoint vertex = ccp(_tileSize.width / 2 * _sizeInTiles.width, 0); CGPoint leftCorner = ccp(vertex.x - _sizeInTiles.width / 2 * _tileSize.width, vertex.原创 2012-03-10 14:42:19 · 837 阅读 · 0 评论 -
cocos2d 2.0中使用UIScrollView卡的解决办法
目前的解决办法是在CCDirectorDisplayLink 的startAnimation 方法中 在calculateDeltaTime 方法中 //[displayLink_ addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; timer_ = [N原创 2012-03-24 22:40:54 · 1534 阅读 · 0 评论 -
Cocos2d中CCSprite与UIImage互相转换
+(CCSprite *) convertImageToSprite:(UIImage *) image { CCTexture2D *texture = [[CCTexture2D alloc] initWithImage:image.CGImage resolutionType:kCCResolutionUnknown]; CCSprite *sprite =原创 2012-06-07 12:38:11 · 4113 阅读 · 0 评论
分享