Exemple #1
0
    public void ScheduleWrite()
    {
        int w       = 40;
        int h       = 15;
        var console = new NativeConsole(w, h);

        string str = "Hello";

        var job = console.SchedulePrint(0, 0, str);

        job.Complete();

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

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

        console.Dispose();
    }
 public NativeArray <Tile> ReadTiles(int x, int y, int length, Allocator allocator) =>
 _console.ReadTiles(x, y, length, allocator);