What is the best way to make a bouncing ball animation with infinite loop on iPhone?

后端 未结 3 1356
有刺的猬
有刺的猬 2020-12-16 08:44

I am developing an iPhone game in which birds bounce.

I have set up the images for animating the wings of the flying bird like this:

[imgBird[i] set         


        
3条回答
  •  死守一世寂寞
    2020-12-16 09:15

    You'll want to use Core Animation instead of manually moving the birds. Take a look at CAAnimation in the docs. You basically set up an animation, the path you want it to move along, and just tell it to run. It'll take care of the rest. It also has support for easing which will make the pace slow down and accelerate so it looks more natural.

提交回复
热议问题