コード例 #1
0
ファイル: CLUI_Node.cs プロジェクト: Gaopest/fightclub
 public static Rect Calc(Rect world, CLUI_Border scale, CLUI_Border pos)
 {
     return Rect.MinMaxRect(
         world.xMin + world.width * scale.x + pos.x,
         world.yMin + world.height * scale.y + pos.y,
         world.xMin + world.width * scale.x2 + pos.x2,
         world.yMin + world.height * scale.y2 + pos.y2);
 }
コード例 #2
0
 public static Rect Calc(Rect world, CLUI_Border scale, CLUI_Border pos)
 {
     return(Rect.MinMaxRect(
                world.xMin + world.width * scale.x + pos.x,
                world.yMin + world.height * scale.y + pos.y,
                world.xMin + world.width * scale.x2 + pos.x2,
                world.yMin + world.height * scale.y2 + pos.y2));
 }
コード例 #3
0
ファイル: CLUI_Node.cs プロジェクト: Gaopest/fightclub
 public static Rect CalcFromFullScreen(CLUI_Border scale, CLUI_Border pos)
 {
     return Rect.MinMaxRect(
        Screen.width * scale.x + pos.x,
        Screen.height * scale.y + pos.y,
        Screen.width * scale.x2 + pos.x2,
        Screen.height * scale.y2 + pos.y2
        );
 }
コード例 #4
0
 public static Rect CalcFromFullScreen(CLUI_Border scale, CLUI_Border pos)
 {
     return(Rect.MinMaxRect(
                Screen.width * scale.x + pos.x,
                Screen.height * scale.y + pos.y,
                Screen.width * scale.x2 + pos.x2,
                Screen.height * scale.y2 + pos.y2
                ));
 }
コード例 #5
0
 protected virtual void OnUpdate()
 {
     if (parent == null)
     {
         rectWorld = CLUI_Border.CalcFromFullScreen(_rectScale, _rectPos);
     }
     else
     {
         rectWorld = CLUI_Border.Calc(parent.rectWorld, _rectScale, _rectPos);
     }
 }