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; } }
public FRotatedRectangle GetArea() { switch (WallType) { case WallStubType.Void: return(FRotatedRectangle.CreateByCenter(FPoint.MiddlePoint(Point1, Point2), (Point2 - Point1).Length(), VoidWallBlueprint.DEFAULT_WIDTH, (Point2 - Point1).ToAngle())); case WallStubType.Glass: return(FRotatedRectangle.CreateByCenter(FPoint.MiddlePoint(Point1, Point2), (Point2 - Point1).Length(), GlassBlockBlueprint.DEFAULT_WIDTH, (Point2 - Point1).ToAngle())); case WallStubType.Mirror: return(FRotatedRectangle.CreateByCenter(FPoint.MiddlePoint(Point1, Point2), (Point2 - Point1).Length(), MirrorBlockBlueprint.DEFAULT_WIDTH, (Point2 - Point1).ToAngle())); default: SAMLog.Error("LEWS::EnumSwitch_GA", "WallType = " + WallType); return(default(FRotatedRectangle)); } }
public FRotatedRectangle GetShortenedArea() { return(FRotatedRectangle.CreateByCenter(Center, Length - 17, Portal.WIDTH, Normal + FloatMath.RAD_NEG_090)); }
public IFShape GetClickArea() { return(FRotatedRectangle.CreateByCenter(Center, Length + GDConstants.TILE_WIDTH, Portal.WIDTH + GDConstants.TILE_WIDTH, Normal + FloatMath.RAD_NEG_090)); }