Пример #1
0
        protected override void OnDraw(IBatchRenderer sbatch)
        {
            CommonObstacleRenderer.DrawPortal(sbatch, _renderRects, Color, Normal);

#if DEBUG
            if (DebugSettings.Get("DebugEntityBoundaries"))
            {
                sbatch.FillCircle(Position, 4, 16, Color.Turquoise);
                sbatch.DrawLine(Position, Position + Vector2.UnitX.RotateWithLength(Normal, 32), Color.Turquoise, 2);
            }
#endif
        }
Пример #2
0
        protected override void OnDraw(IBatchRenderer sbatch)
        {
            if (GDOwner.Selection == this)
            {
                sbatch.FillShape(GetArea().AsInflated(GDConstants.TILE_WIDTH / 2, GDConstants.TILE_WIDTH / 2), Color.Black * 0.333f);
            }

            if (_ppCacheKey != EquatableTuple.Create(Length, Normal, Position))
            {
                _ppCacheKey   = EquatableTuple.Create(Length, Normal, Position);
                _ppCacheRects = CommonObstacleRenderer.CreatePortalRenderRects(Position, Vector2.UnitX.Rotate(Normal), Vector2.UnitX.Rotate(Normal).RotateWithLength(FloatMath.RAD_POS_090, Length / 2f), Length);
            }

            CommonObstacleRenderer.DrawPortal(sbatch, _ppCacheRects, Portal.COLORS[Group], Normal);
        }