コード例 #1
0
        private static void DisplayAsync()
        {
            string text = Story.TransitionTexts[_mapLevel - 1];

            _UIConsole.Resize(_screenWidth, _screenHeight);
            _UIConsole.Clear();
            _UIConsole.SetChar(1, 5, '_');
            int i = 1;
            int j = 5;

            foreach (char letter in text)
            {
                _UIConsole.SetChar(i, j, letter);
                _UIConsole.SetChar(i + 1, j, '_');
                RLConsole.Blit(_UIConsole, 0, 0, _UIConsole.Width, _UIConsole.Height, _rootConsole, 0, 0);
                _rootConsole.Draw();
                if (letter == '.')
                {
                    Thread.Sleep(500);
                }
                Thread.Sleep(Dice.Roll("3D30"));
                i++;
                if (i >= _UIConsole.Width - 3)
                {
                    _UIConsole.SetChar(i, j, ' ');
                    j += 2;
                    i  = 1;
                }
            }
            Thread.Sleep(1000);
        }