Open 3D Engine GameStateSamples Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
GameStateSamples::GameOptions Class Referencefinal

Game options that can be modified via the options menu and saved to persistent storage. More...

#include <GameOptionRequestBus.h>

Public Member Functions

 AZ_CLASS_ALLOCATOR (GameOptions, AZ::SystemAllocator)
 
 AZ_RTTI (GameOptions, "{DC3C8011-7E2B-458F-8C95-FC1A06C9D8F4}")
 
void OnLoadedFromPersistentData ()
 Called when loaded from persistent data.
 
float GetAmbientVolume () const
 
void SetAmbientVolume (float ambientVolume)
 
void ApplyAmbientVolume ()
 
float GetEffectsVolume () const
 
void SetEffectsVolume (float effectsVolume)
 
void ApplyEffectsVolume ()
 
float GetMainVolume () const
 
void SetMainVolume (float mainVolume)
 
void ApplyMainVolume ()
 
float GetMusicVolume () const
 
void SetMusicVolume (float musicVolume)
 
void ApplyMusicVolume ()
 

Static Public Member Functions

static void Reflect (AZ::SerializeContext &sc)
 

Static Public Attributes

static constexpr const char * SaveDataBufferName = "GameOptions"
 Name of the game options save data file.
 
static constexpr float DefaultAmbientVolume = 100.0f
 
static constexpr float DefaultEffectsVolume = 100.0f
 
static constexpr float DefaultMainVolume = 100.0f
 
static constexpr float DefaultMusicVolume = 100.0f
 

Detailed Description

Game options that can be modified via the options menu and saved to persistent storage.

Member Function Documentation

◆ GetAmbientVolume()

float GameStateSamples::GameOptions::GetAmbientVolume ( ) const
inline

Effects volume accessor function.

◆ GetEffectsVolume()

float GameStateSamples::GameOptions::GetEffectsVolume ( ) const
inline

Effects volume accessor function.

◆ GetMainVolume()

float GameStateSamples::GameOptions::GetMainVolume ( ) const
inline

Main volume accessor function.

◆ GetMusicVolume()

float GameStateSamples::GameOptions::GetMusicVolume ( ) const
inline

Music volume accessor function.

Member Data Documentation

◆ DefaultAmbientVolume

constexpr float GameStateSamples::GameOptions::DefaultAmbientVolume = 100.0f
staticconstexpr

Default value for the specified game option.


The documentation for this class was generated from the following file: