Esempio n. 1
0
 /// <summary>
 /// 初期化・インスタンス生成.
 /// </summary>
 static public void Init(
     int fixWidth,
     int fixHeight
     )
 {
     inst = new GameWindowSize(fixWidth, fixHeight);
 }
Esempio n. 2
0
        /// <summary>
        /// GUI.
        /// </summary>
        void OnGUI()
        {
#if UNITY_EDITOR
            if (prevScreenW != Screen.width || prevScreenH != Screen.height)
            {
                GameWindowSize.ReCalc(LibBridgeInfo.FIXED_SCREEN_WI, LibBridgeInfo.FIXED_SCREEN_HI);
                foreach (GUIStyle style in GUI.skin)
                {
                    style.fontSize = (int)(20 * GameWindowSize.GameScreenScale);
                }
            }
            prevScreenW = (int)gameview.position.width;
            prevScreenH = (int)gameview.position.height;
#endif
        }
Esempio n. 3
0
 public static Rect GetScaledRectWithoutSpace(Rect rect)
 {
     return(GameWindowSize.GetRectWithoutSpace(rect));
 }
Esempio n. 4
0
 public static Rect GetScaledRectWithoutSpace(float x, float y, float w, float h)
 {
     return(GameWindowSize.GetRectWithoutSpace(x, y, w, h));
 }
Esempio n. 5
0
 public static Rect GetScaledRect(Rect rect)
 {
     return(GameWindowSize.GetRect(rect));
 }