Skip to content

Game Settings

Millie Macdonald edited this page Jan 18, 2017 · 1 revision

Game Settings Wiki

The settings screen allows the player to change the clock format and adjust the in-game sound volumes. The clock format can either be 24/12hr time selected with a toggle button and the sounds options are separated into individual volume sliders for sound effects and background music and a global mute checkbox.

These settings are automatically saved to the player's system using the Preferences API so that they are saved between game plays.

How To Use

Settings Screen

Settings Screen

Settings Interactions

Settings Interactions

  1. 24/12hr toggle
  2. Sound effects volume
  3. Background music volume
  4. Mute check
  5. Back to Main Menu

Code Usage

Sound class

Sound represents the players sounds settings

Constructor Use

Parameters Description
boolean muted, double sfxVolume, double backgroundVolume A Sound object is created with the given values. sfxVolume and backgroundVolume are bounded between 0 and 1 and if they are outside those bounds they will be automatically adjusted to fit between them (eg. -0.17 -> 0, 1.53 -> 1)

Public Methods

Method Parameters Returns Description
isMuted none boolean Check if the Sound object is muted
getSFXVolume none double Get the volume for sound effects, returns [0,1]
getBackgroundVolume none double Get the volume for background music, return [0,1]

Resolution class

Resolution represents a screen resolution (currently not in use)

Constructor Use

Parameters Description
double width, double height, String ratio A Resolution object is created with the given values.

Public Methods

Method Parameters Returns Description
getWidth none double Get the width of the resolution
getHeight none double Get the height of the resolution
toString none String Get the string representation of the resolution in the form, "width x height ratio"

GameManager class

Public Methods Created for Settings in GameManager

Method Parameters Returns Description
saveWindowSettings none none Save the current position of the game window to user's system
set24Hour boolean set none Saves the value of set as the 24hr toggle settings to the user's system
is24Hour none boolean Check if the 24hr toggle setting, from the user's sysmte, is true
setSound Sound sound none Updates the Sound object in GameManger to sound and save all the settings from sound to the user's system
getSound none Sound Get the current Sound object from GameManager

Home

Saving and Loading

Statistics tracking

Game Play

APIs


Game Guide

Other Guides

Design Guides

Overviews

Features

Animations

Splash Screen & Create Account Screen

Player Account Settings

AI

Duck Dust


Brainstorming


Future Development


http://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gif

Clone this wiki locally