Exemple #1
0
        protected override void OnDraw(IBatchRenderer sbatch)
        {
            if (GDOwner.Selection == this)
            {
                if (ObstacleType == ObstacleStubType.MirrorBlock || ObstacleType == ObstacleStubType.GlassBlock)
                {
                    var a = FRotatedRectangle.CreateByCenter(Position, Width, Height, Rotation).GetBoundingRectangle();
                    sbatch.DrawCentered(Textures.TexPixel, Position, a.Width + GDConstants.TILE_WIDTH, a.Height + GDConstants.TILE_WIDTH, Color.Black * 0.333f);
                }
                else
                {
                    sbatch.DrawCentered(Textures.TexPixel, Position, Width + GDConstants.TILE_WIDTH, Height + GDConstants.TILE_WIDTH, Color.Black * 0.333f);
                }
            }

            switch (ObstacleType)
            {
            case ObstacleStubType.BlackHole:
                CommonObstacleRenderer.DrawBlackHole(sbatch, Position, Lifetime, Width, -Power);
                break;

            case ObstacleStubType.WhiteHole:
                CommonObstacleRenderer.DrawBlackHole(sbatch, Position, Lifetime, Width, Power);
                break;

            case ObstacleStubType.GlassBlock:
                CommonObstacleRenderer.DrawGlassBlock(sbatch, FRotatedRectangle.CreateByCenter(Position, Width, Height, Rotation));
                break;

            case ObstacleStubType.MirrorBlock:
                CommonObstacleRenderer.DrawMirrorBlock(sbatch, FRotatedRectangle.CreateByCenter(Position, Width, Height, Rotation));
                break;

            case ObstacleStubType.MirrorCircle:
                CommonObstacleRenderer.DrawMirrorCircle(sbatch, Position, Width);
                break;

            case ObstacleStubType.VoidVircle:
                CommonObstacleRenderer.DrawVoidCircle_BG(sbatch, Position, Width);
                break;

            default:
                SAMLog.Error("LEOS::EnumSwitch_CS_OD", "ObstacleType = " + ObstacleType);
                break;
            }
        }
Exemple #2
0
 protected override void OnDraw(IBatchRenderer sbatch)
 {
     CommonObstacleRenderer.DrawMirrorBlock(sbatch, _bounds);
 }