PixelToWorld() public static method

public static PixelToWorld ( IntVector2 pixelPosition ) : Vector2
pixelPosition Assets.RagePixel2.Editor.Utility.IntVector2
return Vector2
示例#1
0
 private void DrawGizmo(RagePixelState state)
 {
     Utility.DrawRectangle(
         Utility.PixelToWorld(default(Vector2Int), state.Transform, state.Sprite, false),
         Utility.PixelToWorld(_size, state.Transform, state.Sprite, false), Color.white
         );
 }
示例#2
0
 private void DrawGizmo(RagePixelState state)
 {
     Utility.DrawRectangle(
         Utility.PixelToWorld(default(IntVector2), state.transform, state.sprite, false),
         Utility.PixelToWorld(m_Size, state.transform, state.sprite, false), Color.white
         );
 }
示例#3
0
        public void OnRepaint(RagePixelState state)
        {
            if (!active)
            {
                return;
            }

            state.DrawSpriteBounds();

            Rect r = rect;

            Utility.DrawRectangle(
                Utility.PixelToWorld(new IntVector2(r.xMin, r.yMin), state.transform, state.sprite, false),
                Utility.PixelToWorld(new IntVector2(r.xMax + 1, r.yMax + 1), state.transform, state.sprite, false),
                Color.white
                );
        }
示例#4
0
        public void OnRepaint(RagePixelState state)
        {
            if (!Active)
            {
                return;
            }

            state.DrawSpriteBounds();

            Rect r = Rect;

            Utility.DrawRectangle(
                Utility.PixelToWorld(new Vector2Int((int)r.xMin, (int)r.yMin), state.Transform, state.Sprite, false),
                Utility.PixelToWorld(new Vector2Int((int)r.xMax + 1, (int)r.yMax + 1), state.Transform, state.Sprite, false),
                Color.white
                );
        }