-1

在 cocos2d 游戏中添加放大镜时已经提出了这个问题, 但我不太明白答案。我正在使用相同的教程 Let's Spot It 正在使用,但我不确定将 madhu 的代码放在哪里。我也不知道 runAction 方法是什么样的。

谢谢

4

1 回答 1

0

Hmm... Cocos2d CCLens3D, makes the area that is set by the programmer to popup.. Please look at the example provided by cocos2d..

the codes:

id lens = [CCLens3D actionWithPosition:ccp(size.width/2,size.height/2) radius:240 grid:ccg(15,10) duration:0.0f]; 



[self runAction:lens];

self is the layer where your image should be..

ccp(size.width/2, size.height/2) should be changed to ccp(yourPosition.x, yourPosition.y), means the positions which you want the popUp to be at.. Radius is the size of the circle, duration is how long you want it to be, 0.0 meaning infinite.. grid just use the same values..

于 2011-07-02T14:27:59.293 回答