示例#1
0
        public void SelectInAreaViaRasterize(vec2 pos, vec2 size, bool Deselect, bool Selecting, float Player, bool EffectSelection, bool Fake = false)
        {
            DataDrawMouse.Using(Assets.SelectCircle_Data, Player, Output: SelectField, Clear: Color.Transparent);

            if (Selecting)
            {
                RectangleQuad.Draw(GraphicsDevice, pos, size);
            }

            if (EffectSelection)
            {
                SelectUnits(Player, Deselect, Fake);
            }
        }
示例#2
0
        public void SelectAlongLine(vec2 p1, vec2 p2, vec2 size, bool Deselect, bool Selecting, float Player, bool EffectSelection, bool Fake = false)
        {
            DataDrawMouse.Using(Assets.SelectCircle_Data, Player, Output: SelectField, Clear: Color.Transparent);

            if (Selecting)
            {
                vec2 shift = CellSpacing.FlipY();

                for (int i = 0; i <= 10; i++)
                {
                    float t   = i / 10.0f;
                    var   pos = t * p2 + (1 - t) * p1;
                    RectangleQuad.Draw(GraphicsDevice, pos - shift, size);
                }
            }

            if (EffectSelection)
            {
                SelectUnits(Player, Deselect, Fake);
            }
        }