C# Класс RoadNamer.Managers.OptionsManager

Manages all ingame options. Handles the interface between ingame options storage and saving/loading from disk.
Наследование: UnityEngine.MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
m_build int
m_hasOpenedPanel bool
m_isIngame bool
m_major int
m_minor int
m_randomNamesLocation string
m_revision int
m_spritesLocation string
m_versionStringFull string
m_workshopId uint

Открытые методы

Метод Описание
CreateOptions ( UIHelperBase helper ) : void

Creates options on a panel using the helper

GetCheckBoxValue ( string uniqueName, bool &returnValue ) : bool

Gets a bool from an option that was set using a checkbox

GetDropdownValue ( string uniqueName, int &returnValue ) : bool

Gets a string from an option that was set using a dropdown

GetDropdownValue ( string uniqueName, string &returnValue ) : bool

Gets a string from an option that was set using a dropdown

GetSliderValue ( string uniqueName, float &returnValue ) : bool

Gets a float from an option that was set using a slider

LoadOptions ( ) : void

Load options from disk and replace default values with stored ones.

Populate ( ) : void

Populates everything that needs any additional data loading

SaveOptions ( ) : void

Save options to disk

UpdateEverything ( ) : void

Updates everything ingame. Should be used when one of the options has updated and ingame elements need immediately refreshing.

Приватные методы

Метод Описание
CheckBox_eventCheckChanged ( UIComponent component, bool value ) : void
Dropdown_eventSelectedIndexChanged ( UIComponent component, int value ) : void
OptionChanged ( bool value ) : void
OptionChanged ( float value ) : void
OptionChanged ( int sel ) : void
SaveButtonClicked ( ) : void
Slider_eventValueChanged ( UIComponent component, float value ) : void

Описание методов

CreateOptions() публичный Метод

Creates options on a panel using the helper
public CreateOptions ( UIHelperBase helper ) : void
helper UIHelperBase The UIHelper to put the options on
Результат void

GetCheckBoxValue() публичный статический Метод

Gets a bool from an option that was set using a checkbox
public static GetCheckBoxValue ( string uniqueName, bool &returnValue ) : bool
uniqueName string The unique name of the checkbox option
returnValue bool The value to replace
Результат bool

GetDropdownValue() публичный статический Метод

Gets a string from an option that was set using a dropdown
public static GetDropdownValue ( string uniqueName, int &returnValue ) : bool
uniqueName string The unique name of the dropdown option
returnValue int The value to replace
Результат bool

GetDropdownValue() публичный статический Метод

Gets a string from an option that was set using a dropdown
public static GetDropdownValue ( string uniqueName, string &returnValue ) : bool
uniqueName string The unique name of the dropdown option
returnValue string The value to replace
Результат bool

GetSliderValue() публичный статический Метод

Gets a float from an option that was set using a slider
public static GetSliderValue ( string uniqueName, float &returnValue ) : bool
uniqueName string The unique name of the slider option
returnValue float The value to replace
Результат bool

LoadOptions() публичный статический Метод

Load options from disk and replace default values with stored ones.
public static LoadOptions ( ) : void
Результат void

Populate() публичный статический Метод

Populates everything that needs any additional data loading
public static Populate ( ) : void
Результат void

SaveOptions() публичный статический Метод

Save options to disk
public static SaveOptions ( ) : void
Результат void

UpdateEverything() публичный статический Метод

Updates everything ingame. Should be used when one of the options has updated and ingame elements need immediately refreshing.
public static UpdateEverything ( ) : void
Результат void

Описание свойств

m_build публичное статическое свойство

public static int m_build
Результат int

m_hasOpenedPanel публичное статическое свойство

public static bool m_hasOpenedPanel
Результат bool

m_isIngame публичное статическое свойство

public static bool m_isIngame
Результат bool

m_major публичное статическое свойство

public static int m_major
Результат int

m_minor публичное статическое свойство

public static int m_minor
Результат int

m_randomNamesLocation публичное статическое свойство

public static string m_randomNamesLocation
Результат string

m_revision публичное статическое свойство

public static int m_revision
Результат int

m_spritesLocation публичное статическое свойство

public static string m_spritesLocation
Результат string

m_versionStringFull публичное статическое свойство

public static string m_versionStringFull
Результат string

m_workshopId публичное статическое свойство

public static uint m_workshopId
Результат uint