Example #1
0
        public void Show()
        {
            // 업데이트
            Update();

            // 타이틀
            ScreenUtil.DrawTitle($"{d.Name} WAVE {CurrentWave + 1}/{d.Waves.Count}");

            // 바로가기
            ScreenUtil.DrawHotKeyNavigator(new HotKeyNavigator().AddHotKey("SPACE", "공격"));

            // 구분자
            ScreenUtil.DrawHorizontalSeparator(25);

            // 몬스터

            /*foreach (Monster monster in d.Waves[CurrentWave].Monsters)
             * {
             *  if (targets.Contains(monster))
             *  {
             *      ScreenUtil.StackHighlight(string.Format("{0,-12}{1,-20}", monster.Name, monster.TotalAbility.HP.ToString()), monsterHit);
             *  }
             *  else
             *  {
             *      ScreenUtil.Stack(string.Format("{0,-12}{1,-20}", monster.Name, monster.TotalAbility.HP.ToString()));
             *  }
             * }*/

            for (int i = 0; i < d.Waves[CurrentWave].Monsters.Count; i++)
            {
                Monster monster = d.Waves[CurrentWave].Monsters[i];

                if (targets.Contains(monster))
                {
                    CHelper.WriteHighlight(monster.Name, ScreenUtil.Left, 3 + i, monsterHit);
                }
                else
                {
                    CHelper.Write(monster.Name, ScreenUtil.Left, 3 + i);
                }
                CHelper.DrawStatusBar(monster.TotalAbility.HP, monster.TotalAbility.HPMax, 20, 3 + i, 20, ConsoleColor.Red, ConsoleColor.Black);
            }

            // 캐릭터
            CHelper.Write("공격", ScreenUtil.Left, 26, Character.AttackCool == Character.TotalAbility.CoolTick ? ConsoleColor.Green : ConsoleColor.White);
            CHelper.DrawBar(ScreenUtil.Left + 6, 26, Character.AttackCool, Character.AttackCool == Character.TotalAbility.CoolTick ? ConsoleColor.Green : ConsoleColor.White);
            CHelper.DrawBar(ScreenUtil.Left + 6 + Character.AttackCool, 26, Character.TotalAbility.CoolTick - Character.AttackCool, ConsoleColor.DarkGray);
            CHelper.WriteHighlight($"HP", ScreenUtil.Left, 27, characterHit);
            CHelper.DrawStatusBar(Character.TotalAbility.HP, Character.TotalAbility.HPMax, ScreenUtil.Left + 6, 27, 30, ConsoleColor.Red, ConsoleColor.DarkGray);

            // 던전 보상 정보
            CHelper.Write($"EXP + {d.AccumulatedExp}", 65, 3, ConsoleColor.Green);
            CHelper.Write($"Gold + {d.AccumulatedGold}", 65, 4, ConsoleColor.Yellow);

            int h = 5;

            foreach (Slot slot in d.AccumulatedItems.Slots)
            {
                if (slot.Item == null)
                {
                    continue;
                }

                CHelper.Write(string.Format("{0,-20}{1,-4}", slot.Item.Name, slot.ItemCount), 65, h++, slot.Item.Color);
            }
        }