Flying Piggy 2D Runner Kit  1.0
Complete 2D runner template for Unity
 All Classes Files Functions Variables Enumerations Enumerator Properties
ScreenSettings Class Reference
Inheritance diagram for ScreenSettings:

Public Attributes

float optimalWidth
 
float optimalHeight
 

Properties

static ScreenSettings Instance [get]
 
Vector3 Scale [get]
 
float RatioScale [get]
 
float DefaultScale [get]
 

Detailed Description

Manages screen settings. Sets scaling parameters according to the screen.

Member Data Documentation

float ScreenSettings.optimalHeight
float ScreenSettings.optimalWidth

Optimal with and height are measures, in which case elements on the screen are in the right place. (Usually a screen resolution that is mostly used on developing process.) They are used later for resizing or relocating elements in the case of different screen resolution or aspect ratio.

Property Documentation

float ScreenSettings.DefaultScale
get

Get default scale Depending on ScreenSettings.RatioScale, defaultScale is ScreenSettings.Scale.x or ScreenSettings.Scale.y.

ScreenSettings ScreenSettings.Instance
staticget

Get single instance of ScreenSettings

float ScreenSettings.RatioScale
get

Get ratio scale Determines if current screen's aspect ratio is wider or narrower as optimal screen. (screenWidth / screenHeight) / (optimalWidth / optimalHeight)

Vector3 ScreenSettings.Scale
get

Get scale x: screenWidth / optimalWidth, y: screenHeight / optimalHeight, z: 1


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