Пример #1
0
        public void render(bool flush)
        {
            TCODConsole.root.clear();
            if (gameStatus == GameStatus.LOADING)
            {
                loadingGui.render();
            }
            else if (gameStatus == GameStatus.DEFEAT)
            {
                defeatGui.render();
            }
            else
            {
                currentLevel.render();
                if (player != null)
                {
                    player.render();
                }
                if (player != null)
                {
                    TCODConsole.root.print(1, screenHeight - 2, string.Format("HP : {0}/{1}",
                                                                              (int)player.getDestructible().hp, (int)player.getDestructible().maxHp));
                }
                gui.render();
                messageGui.render();
                currentLevel.renderGui();

                menuGui.render();
            }

            TCODConsole.flush();
        }