AchievementScreen.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
	void Start(){
		Screen.orientation = ScreenOrientation.Portrait;
		// Get the aspect ratio of the current screen
		float screenProp = (float)Screen.width / (float)Screen.height;
		
		// Change the size of the background image
		SpriteRenderer backgroundImg = GetComponent<SpriteRenderer> ();
		float newSize = (16f/9f) *screenProp; 
		backgroundImg.transform.localScale = new Vector3 (newSize, 1, 1);
		
	}