I've added a visibility enabler to the coin. This means when it isn't on scene it stops animating.
There were several changes to the nowball
-I also replaced the Snowballs visibility notifier with a visibility enabler. Like the coin it stops it from animating while it's offscreen. I also set this one to pause the physics process function when it's offscreen which should give better performance.
-checking if something is active when it's offscreen is now done using signals so that should help performance as well.
-There was also a duplicate line of code I removed.
-I removed the old code for killing the snowball when it falls off screen since the visibilityenabler does it now.
Also I don't think setting things as invisible when they're offscreen improves performance so I left it out.
I've added a visibility enabler to the coin. This means when it isn't on scene it stops animating.
There were several changes to the nowball -I also replaced the Snowballs visibility notifier with a visibility enabler. Like the coin it stops it from animating while it's offscreen. I also set this one to pause the physics process function when it's offscreen which should give better performance. -checking if something is active when it's offscreen is now done using signals so that should help performance as well. -There was also a duplicate line of code I removed. -I removed the old code for killing the snowball when it falls off screen since the visibilityenabler does it now.
Also I don't think setting things as invisible when they're offscreen improves performance so I left it out.