Beispiel #1
0
        public ConsoleDrawer(int x, int y, int width, int height, Vector2Int scale)
        {
            posX             = x;
            posY             = y;
            Scale            = scale;
            _backgroundLayer = new ConsoleColorLayer(width, height);
            _textLayer       = new ConsoleTextLayer(width, height);

            Width  = width;
            Height = height;
        }
Beispiel #2
0
        public ConsoleDrawer(int x, int y, Vector2Int scale, ConsoleColorLayer backgroundLayer, ConsoleTextLayer textLayer)
        {
            if (backgroundLayer.Width != textLayer.Width || backgroundLayer.Height != textLayer.Height)
            {
                throw new ArgumentException("Layer dimensions must match");
            }

            _backgroundLayer = backgroundLayer;
            _textLayer       = textLayer;

            posX  = x;
            posY  = y;
            Scale = scale;

            Width  = backgroundLayer.Width;
            Height = backgroundLayer.Height;
        }