public MirrorBlock(GDGameScreen scrn, MirrorBlockBlueprint blueprint) : base(scrn, GDConstants.ORDER_GAME_WALL) { var pos = new FPoint(blueprint.X, blueprint.Y); _width = blueprint.Width; _height = blueprint.Height; _rotation = FloatMath.ToRadians(blueprint.Rotation); _bounds = new FRotatedRectangle(pos, _width, _height, _rotation); Position = pos; DrawingBoundingBox = _bounds.OuterSize; this.GDOwner().GDBackground.RegisterBlockedBlock(_bounds.WithNoRotation(), _rotation); }
public static void Draw9Patch(IBatchRenderer sbatch, FRotatedRectangle bounds, Color colEdge, Color colCorner, Color colFill, TextureRegion2D texEdge, TextureRegion2D texCorner, TextureRegion2D texFill, float cornerSize) { Draw9Patch(sbatch, bounds.WithNoRotation(), colEdge, colCorner, colFill, texEdge, texCorner, texFill, cornerSize, bounds.Rotation); }