|
Flying Piggy 2D Runner Kit
1.0
Complete 2D runner template for Unity
|
Public Attributes | |
| float | optimalWidth |
| float | optimalHeight |
Properties | |
| static ScreenSettings | Instance [get] |
| Vector3 | Scale [get] |
| float | RatioScale [get] |
| float | DefaultScale [get] |
Manages screen settings. Sets scaling parameters according to the screen.
| 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.
|
get |
Get default scale Depending on ScreenSettings.RatioScale, defaultScale is ScreenSettings.Scale.x or ScreenSettings.Scale.y.
|
staticget |
Get single instance of ScreenSettings
|
get |
Get ratio scale Determines if current screen's aspect ratio is wider or narrower as optimal screen. (screenWidth / screenHeight) / (optimalWidth / optimalHeight)
|
get |
Get scale x: screenWidth / optimalWidth, y: screenHeight / optimalHeight, z: 1