PauseScene

class PauseScene : SKScene

The SpriteKit scene class for the pause menu.

  • The label node that corresponds to the main menu button.

    Declaration

    Swift

    var mainMenuButton: SKLabelNode?
  • The label node that corresponds to the options button.

    Declaration

    Swift

    var optionsButton: SKLabelNode?
  • The label node that corresponds to the resume button.

    Declaration

    Swift

    var resumeButton: SKLabelNode?
  • The lavel node that corresponds to the restart button.

    Declaration

    Swift

    var restartButton: SKLabelNode?
  • Set up the scene and hook up the buttons to make the pause menu functional.

    Declaration

    Swift

    override func sceneDidLoad()
  • Listen for mouse events and trigger the corresponding menu action.

    Declaration

    Swift

    override func mouseDown(with event: NSEvent)
  • Listen for keyboard events and return when the user presses the pause key.

    Declaration

    Swift

    override func keyDown(with event: NSEvent)