Ejemplo n.º 1
0
        private void DrawVoidWall(VoidWallBlueprint w)
        {
            var wx = w.X / 64;
            var wy = w.Y / 64;
            var wl = w.Length / 64;

            DrawLine(wx, wy, wl, w.Rotation, '-', '|', '/', '\\');
        }
Ejemplo n.º 2
0
        public VoidWall(GDGameScreen scrn, VoidWallBlueprint blueprint) : base(scrn, GDConstants.ORDER_GAME_WALL)
        {
            var pos = new FPoint(blueprint.X, blueprint.Y);

            _rotation       = FloatMath.DegreesToRadians * blueprint.Rotation;
            _length         = blueprint.Length;
            _rectsUnrotated = CommonWallRenderer.CreateVoidWallRenderRects(pos, _length, _rotation);

            Position = pos;

            DrawingBoundingBox = new Vector2(_length, 0).Rotate(_rotation).ToAbsFSize().AtLeast(WIDTH, WIDTH);

            this.GDOwner().GDBackground.RegisterBlockedLine(pos - Vector2.UnitX.RotateWithLength(_rotation, _length / 2f), pos + Vector2.UnitX.RotateWithLength(_rotation, _length / 2f));
        }