开发者

cocos2d for iphone

开发者 https://www.devze.com 2023-02-19 18:49 出处:网络
I have a rectangular shape like a bar,i want it to be hanged and swinging in both direction continuously (a bomb is thrown in may game and this is opening and closing the path)

I have a rectangular shape like a bar, i want it to be hanged and swinging in both direction continuously (a bomb is thrown in may game and this is opening and closing the path) how can i implement this in cocos2d space mana开发者_StackOverflow社区ger also how can i make a similar bar rotating around its center (a center as a pivot point)


You could use CCActionMoveBy or CCActionMoveTo for moving one side to another the CCSprite and CCActionRotateTo or CCActionRotateBy to rotate (in case you don't want it to collide using Box2D or Chimpunk).

0

精彩评论

暂无评论...
验证码 换一张
取 消