Tanks Multiplayer  1.5
Public Member Functions | Public Attributes | List of all members
UIMain

UI script for all elements, settings and user interactions in the menu scene. More...

Inheritance diagram for UIMain:

Public Member Functions

void Play ()
 Tries to enter the game scene. Sets the loading screen active while connecting to the Matchmaker and starts the timeout coroutine at the same time. More...
 
void OpenShop ()
 Increase counter when opening the shop. Used for Unity Analytics purposes. More...
 
void OpenSettings ()
 Increase counter when opening settings. Used for Unity Analytics purposes. More...
 
void OnNetworkChanged (int value)
 Allow additional input of server address only in network mode LAN. Otherwise, the input field will be hidden in the settings (Photon only). More...
 
void OnGameModeChanged (int value)
 Save newly selected GameMode value to PlayerPrefs in order to check it later. Called by DropDown onValueChanged event. More...
 
void OnMusicChanged (bool value)
 Modify music AudioSource based on player selection. Called by Toggle onValueChanged event. More...
 
void OnVolumeChanged (float value)
 Modify global game volume based on player selection. Called by Slider onValueChanged event. More...
 
void CloseSettings ()
 Saves all player selections chosen in the Settings window on the device. More...
 
void RateApp ()
 Opens a browser window to the App Store entry for this app. More...
 

Public Attributes

GameObject loadingWindow
 Window object for loading screen between connecting and scene switch. More...
 
GameObject connectionErrorWindow
 Window object for displaying errors with the connection or timeouts. More...
 
GameObject billingErrorWindow
 Window object for displaying errors with the billing actions. More...
 
InputField nameField
 Settings: input field for the player name. More...
 
Dropdown networkDrop
 Settings: dropdown selection for network mode. More...
 
Dropdown gameModeDrop
 Dropdown selection for preferred game mode. More...
 
InputField serverField
 Settings: input field for manual server address, hosting a server in a private network (Photon only). More...
 
Toggle musicToggle
 Settings: checkbox for playing background music. More...
 
Slider volumeSlider
 Settings: slider for adjusting game sound volume. More...
 

Detailed Description

UI script for all elements, settings and user interactions in the menu scene.

Member Function Documentation

void CloseSettings ( )

Saves all player selections chosen in the Settings window on the device.

void OnGameModeChanged ( int  value)

Save newly selected GameMode value to PlayerPrefs in order to check it later. Called by DropDown onValueChanged event.

void OnMusicChanged ( bool  value)

Modify music AudioSource based on player selection. Called by Toggle onValueChanged event.

void OnNetworkChanged ( int  value)

Allow additional input of server address only in network mode LAN. Otherwise, the input field will be hidden in the settings (Photon only).

void OnVolumeChanged ( float  value)

Modify global game volume based on player selection. Called by Slider onValueChanged event.

void OpenSettings ( )

Increase counter when opening settings. Used for Unity Analytics purposes.

void OpenShop ( )

Increase counter when opening the shop. Used for Unity Analytics purposes.

void Play ( )

Tries to enter the game scene. Sets the loading screen active while connecting to the Matchmaker and starts the timeout coroutine at the same time.

void RateApp ( )

Opens a browser window to the App Store entry for this app.

Member Data Documentation

GameObject billingErrorWindow

Window object for displaying errors with the billing actions.

GameObject connectionErrorWindow

Window object for displaying errors with the connection or timeouts.

Dropdown gameModeDrop

Dropdown selection for preferred game mode.

GameObject loadingWindow

Window object for loading screen between connecting and scene switch.

Toggle musicToggle

Settings: checkbox for playing background music.

InputField nameField

Settings: input field for the player name.

Dropdown networkDrop

Settings: dropdown selection for network mode.

InputField serverField

Settings: input field for manual server address, hosting a server in a private network (Photon only).

Slider volumeSlider

Settings: slider for adjusting game sound volume.


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