The difference lies in the isPaused property of the SpriteNodes.
And this property seems to set itself depending on whether or not you moved/altered a referenced Sprite since you last build/ran CatNap.
I figured out a way to be able to modify Sprites between builds, it’s a pain but it works.
How to keep the Sprite Nodes from Pausing
The Key is to not move a Sprite that you just placed in, until AFTER it’s first build.
In Cat.sks file - (or any sks file you want to reference)
Set up scene size. 380 x 440 points
Page 167 details how to set it up.
Place a Reference object anywhere in the scene.
Page 169 has instructions
- Name cat_shared
- Reference Cat
- Position 1030, 1045
- zPosition 10
Place a Colour Sprite object into the scene
Important! Don’t move it once you drop it in the scene - that will cause the Sprite’s isPaused property to insta be set to true!
If you moved the Sprite: delete it and drop a new one in.
Set it’s colour to System Green Colour (or any colour except red to avoid confusion)
Place a Rotate Action object in the timeline for that Sprite and have it repeat via ∞ infinity loop.
Page 177 has details.
- Build/Run - the green square Sprite should rotate. isPaused = false
Temp Cat Body
- Drag in 4 more Colour Sprites into the scene.
- Build / Run - the Green Sprite should still be rotating.
- These 4 Red Sprites will be
- A Temporary Cat Body
name it temp_body, texture cat_body, X 22, Y -112
- Cat Head
Name cat_head, Parent temp_body, texture cat_head, X 18, Y 192
- Cat Mouth
Name mouth, Parent cat_head, texture cat_mouth, X 6, Y -67
- Cat Eyes
Name eyes, Parent cat_head, texture cat_eyes, X 6, Y 2
Page 167 - 168 details their properties.
- Build / Run - Green Sprite should still be rotating, and all the Sprites should not be Paused. Now’s a great time to commit changes to your Git repository.
Place a Colour Sprite object into the scene - it will be Red.
Place RotateToAngle Action on the Sprite
Page 173 has details.
Duration: 2, Degrees: 5
Place another RotateToAngle Action on the Sprite’s timeline
Select Both and repeat them forever via an ∞ infinity loop
Page 177 has details.
Set the Sprite’s Anchor Point to (0, 0)
If Green Sprite stops spinning now or at any point, it’s a good indicator that your other nodes will no longer animate - that’s probably going to happen, which is why we made a temp_body from the get go.
Name the Red Sprite tail, set it’s texture to cat_tail.
Build and Run, the tail should look like a tail and be swinging.
Set the tail’s parent to temp_body, Position -206, -70, zPosition -1
Build/Run - the Tail will probably stop moving. That’s ok.
If it’s swinging You’re done!
- If the tail stopped swinging - Set the tail’s parent back to SKScene_0.
You can stop here if you don’t mind that the tail’s parent isn’t the cat_body.
The last few steps address this.
Delete the Rotate Action on the Green Sprite, because this Sprite is going to be the cat_body.
Note: Only use this Green Sprite if it has been spinning up until this point.
If your Green Sprite had stopped spinning a few steps above, replace it with a new Colour Sprite.
Set the name of the Green Sprite to cat_body, texture cat_body, X 22, Y -112
Set tail’s parent to cat_body,
Set cat_head’s parent to cat_body
That tail should still be swinging like a boss.
Things should be easier from here on out because it seems this bug only happened when modifying the Sprites in the file referenced, meaning I could freely move the SKEditorReferenceNode to Cat in GameScene without issue.