Exemplo n.º 1
0
        public override void Work()
        {
            // Draw then in the order they were added
            // TODO : add layered ordering

            foreach (var piece in components)
            {
                var transformedPosition = cameraSystem.Transform(piece.position);
                engine.Screen.DrawRectangle(transformedPosition, piece.size, piece.backgroundColor, piece.foregroundColor, piece.symbol);
                //Console.SetCursorPosition(Console.BufferWidth - 10, 0);
                //Console.Write(piece.position);
            }
        }
Exemplo n.º 2
0
        public override void Work(Renderer renderer)
        {
            var position = cameraSystem.Transform(renderer.Position);

            if (engine.Screen.InsideBuffer(position) == false)
            {
                return;
            }

            engine.Screen.SetBuffer(position.x, position.y, renderer.symbol);
            engine.Screen.SetBufferFgColor(position.x, position.y, renderer.foregroundColor);

            // unnecessary possible call to Console.BackgroundColor
            //engine.Screen.SetBufferBgColor(position.x, position.y, envSystem.BackgroundColorOn(position));
        }