我的游戏中有一个CCSprite
,代表一个鸡蛋。我该如何摇晃它?我尝试了以下方法,但没有成功:
id Runleft = [CCMoveTo actionWithDuration:0.1 position:ccp(244, 156)];
id RunRight = [CCMoveTo actionWithDuration:0.1 position:ccp(236, 156)];
[eggPlay runAction:[CCRepeatForever actionWithAction:[CCSequence actions:Runleft,RunRight,nil]]];