// Update is called once per frame void Update() { if (m_Buttons.Count <= m_GameManger.m_Mines && m_GameManger.GetState() == GAMESTATE.PLAYING) { m_GameManger.SetState(GAMESTATE.WON); } if ((Input.deviceOrientation == DeviceOrientation.LandscapeLeft) && (Screen.orientation != ScreenOrientation.LandscapeLeft)) { Screen.orientation = ScreenOrientation.LandscapeLeft; ScaleBoardToScreen(); } if ((Input.deviceOrientation == DeviceOrientation.LandscapeRight) && (Screen.orientation != ScreenOrientation.LandscapeRight)) { Screen.orientation = ScreenOrientation.LandscapeRight; ScaleBoardToScreen(); } if ((Input.deviceOrientation == DeviceOrientation.Portrait) && (Screen.orientation != ScreenOrientation.Portrait)) { Screen.orientation = ScreenOrientation.Portrait; ScaleBoardToScreen(); } #if UNITY_EDITOR ScaleBoardToScreen(); #endif }