Ejemplo n.º 1
0
    public void PrintColor()
    {
        int w       = 40;
        int h       = 15;
        var console = new SimpleConsole(w, h);

        string str = "Hello";

        console.PrintColor(5, 5, str, Color.red, Color.blue);

        var tiles = console.ReadTiles(5, 5, 5, Allocator.Temp);

        for (int i = 0; i < 5; ++i)
        {
            Assert.AreEqual(str[i], ToChar(tiles[i].glyph));
            Assert.AreEqual(Color.red, tiles[i].fgColor);
            Assert.AreEqual(Color.blue, tiles[i].bgColor);
        }

        console.Dispose();
    }