Whats the best way to pause a GKAgent?
My game uses a few agents in some levels and I need to pause them when my game is paused/gameOver.
I dont pause the whole SKScene in my game but rather a worldNode because it gives me more flexibility showing spriteKit stuff even when the game is paused.
I am using the
updateWithDeltaTime...
methods to update my agents behaviour and move them accordingly.
I thought about stopping the update method but the agents will still move to their last known GKGoal.
The best solution I found so far is setting the agent speed/maxSpeed to 0 when my game is paused. The problem I have here is that upon resume its a bit of a pain to reset the speed to the agents previous speed especially when using multiple agents with their own behaviour. They also seem to disappear and than reappear upon resume.
There is no agent.paused method or something similar as far as I understand.
Whats a good way to pause an agent without pausing the SKScene itself?
Thanks for any help and suggestions.