GamePreferences

@available(*, deprecated, message: "Preferences have moved to UserDefults as static variables and AppStorage.")
struct GamePreferences

A data structure that represents the preferences in the game using the standard user defaults.

GENERAL

  • The scale of the camera size for the levels.

    Declaration

    Swift

    public var cameraScale: Float { get set }
  • Whether to move the camera intelligently based on constraints or to always follow the player.

    Declaration

    Swift

    public var intelligentCameraMovement: Bool { get set }
  • Whether to show dust particles.

    Declaration

    Swift

    public var showDustParticles: Bool { get set }

SOUND

  • The volume at which the music should play.

    Declaration

    Swift

    public var musicVolume: Float { get set }
  • Whether to play the costume changing sound.

    Declaration

    Swift

    public var playChangeSound: Bool { get set }
  • Whether to play the computer turn-on sound.

    Declaration

    Swift

    public var playComputerSound: Bool { get set }
  • Whether to play the lever toggle sound.

    Declaration

    Swift

    public var playLeverSound: Bool { get set }
  • Whether to play the alarm clock enable/disable sound.

    This setting does not control the sound for the ticks while the alarm is active.

    Declaration

    Swift

    public var playAlarmSound: Bool { get set }

ADVANCED PROPERTIES

  • Whether the player can see the main character with the USB costume partially undone on the main menu.

    This preference is enabled after earning the Face Reveal achievement.

    Declaration

    Swift

    public var canShowUnmodeledOnMenu: Bool { get }
  • Whether to show the main character with the USB costume partially undone.

    Declaration

    Swift

    public var showUnmodeledOnMenu: Bool { get set }

DEBUGGING PROPERTIES

  • Whether to show the number of nodes in the debugging screen.

    Declaration

    Swift

    public var showNodeCount: Bool { get set }
  • Whether to show the number of frames per second in the debugging screen.

    Declaration

    Swift

    public var showFramesPerSecond: Bool { get set }
  • Whether to show the outlines of physics bodies in the debugging screen.

    Declaration

    Swift

    public var showPhysicsBodies: Bool { get set }
  • Instantiate the preferences.

    Default values are assigned if no values exist.

    Declaration

    Swift

    init()