示例#1
0
 /// <summary>
 /// 初期化・インスタンス生成.
 /// </summary>
 static public void Init(
     int fixWidth,
     int fixHeight
     )
 {
     inst = new GameWindowSize(fixWidth, fixHeight);
 }
示例#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
        }
示例#3
0
 public static Rect GetScaledRectWithoutSpace(Rect rect)
 {
     return(GameWindowSize.GetRectWithoutSpace(rect));
 }
示例#4
0
 public static Rect GetScaledRectWithoutSpace(float x, float y, float w, float h)
 {
     return(GameWindowSize.GetRectWithoutSpace(x, y, w, h));
 }
示例#5
0
 public static Rect GetScaledRect(Rect rect)
 {
     return(GameWindowSize.GetRect(rect));
 }