Esempio n. 1
0
        public void DrawRectangle(Vector4 pos)
        {
            if (pos.W == 0 || pos.H == 0)
            {
                return;
            }

            try {
                pos = reader.GameToScreen(pos);

                if (hitboxUI == null)
                {
                    hitboxUI = new Rectangle {
                        Stroke          = Brushes.Red,
                        StrokeThickness = 3
                    };
                    CanvasInfo.Children.Add(hitboxUI);
                }

                hitboxUI.Visibility = OriInfo.Visibility;

                Canvas.SetLeft(hitboxUI, pos.X - Left);
                Canvas.SetTop(hitboxUI, pos.Y - Top);

                hitboxUI.Width  = pos.W;
                hitboxUI.Height = pos.H;
            } catch { }
        }