Kevin Wang
Kevin Wang

Reputation: 49

Xcode Swift sprite-kit SKS file animation works right in the SKS file, but doesn't work on the simulator or iPhone

I am creating an iOS Swift game on Xcode. The game is about a ball and made a moving (left and right) obstacle with a texture animation to go along with it in the SKS file of my level. And in the SKS file, when I clicked the "Animate" button right under the scene editor, the obstacle shows, moves, and works perfectly, but when I ran it on the simulator and on an actual iPhone the movement and animation doesn't do anything or work at all. Also, there were no error messages, the moving obstacle just don't animate or move.

Is there something I forgot to add or select?

I had worked 2 days on this, looking at other people's code and recreating the scene/obstacle sprite, but none of them worked for me.

I expected the moving obstacle to move left and right and animate with the image I created, but when I ran the game on the simulator and on an actual iPhone nothing happened, the moving obstacle didn't move or animate anything at all.

Thanks!

Upvotes: 1

Views: 364

Answers (1)

Kevin Wang
Kevin Wang

Reputation: 49

I put a levelNode.isPaused = false in my custom load level method and it worked when I opened the app!

Upvotes: 2

Related Questions