I've read up on the GameplayKit State Machine and the documentation explicitly mention Game UI as an example of usage. Im fully understanding the concept but I am unsure how to implement it while using SpriteKit.
Lets say I want 3 states. Menu, Gameplay and Game Over - All which display content to the SKScene. GameScene class extends SKScene. So it's impossible to turn GameScene into a state machine since we only can extend one class.
Should GameScene have a variable for a state machine with a reference to the SKScene, or is there a better solution? Earlier I've used protocols for state machines which makes it easy, but I'd like to try the functionality of GameplayKit.