Reputation: 1077
I created an Actions.sks file for my game. I've noticed that the first time one of the actions from the file is executed my game glitch's a little bit.
Example: My player comes in contact with a specific block, and that is when it happens. It is a 2d platformer and the camera glitches a little bit. Every other time an action is executed it is fine, it is just that first time.
Do I need to pre-load this file and if so how would this be done?
If you think it could be a different issue, I would love to find out some thoughts.
Thanks!!!
Upvotes: 2
Views: 322
Reputation: 1077
To clear out the glitch I did what @El Tomato recommended. I initialized one of the actions in my Actions.sks file:
_ = SKAction.init(named: "ExAction")
Once I did this, all actions ran fine with out the glitch.
Upvotes: 1