Sine Wave Motion In SpriteKit

前端 未结 3 768
萌比男神i
萌比男神i 2021-01-02 07:25

I want to make sine wave motion from the first point in the screen to the last Point in the screen, independent on the size of the screen.

Here is my code, but it d

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-02 07:49

    I would create a game loop based that updates all of your game elements instead of relying on SKActions. SKActions is generally a way to perform animations, for continuos movement of game elements make a simple engine and have it update the positions of your red birds.

提交回复
热议问题