阅读背景:

如何在Swift中围绕其起始值上下移动SKSpriteNode?

来源:互联网 

I'm currently working on a game, where there's a SKSpriteNode. I want, that this node's location moves up and down all the time. At the beginning, it should have the y value e.g. 500 . Then it should move 200 px down (500+200=700) and then it should move 400 up (700-400=300) so it creates like a up and down, which travels between 500+200 and 500-200 all the time. I hope I explained it understandable. First, how do I get this effect and second, where do I enter it? Should I use a custom func? I'm programming with swift (newbie to swift)I'm currently working on a game, where there's




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: