Пример #1
0
        public MainWindow()
        {
            InitializeComponent();

            PlayerSelect playerSelect = new PlayerSelect();

            playerSelect.ShowDialog();

            Label_P1Name.Content   = playerOne.Name;
            Label_P1Health.Content = $"Health :{playerOne.Health}";

            Label_P2Name.Content   = playerTwo.Name;
            Label_P2Health.Content = $"Health :{playerTwo.Health}";

            Label_P3Name.Content   = playerThree.Name;
            Label_P3Health.Content = $"Health :{playerThree.Health}";

            Label_P4Name.Content   = playerFour.Name;
            Label_P4Health.Content = $"Health :{playerFour.Health}";

            playerQueue.Enqueue(playerOne);
            playerQueue.Enqueue(playerTwo);
            playerQueue.Enqueue(playerThree);
            playerQueue.Enqueue(playerFour);


            currentMonster              = dm.ReadFirstMonster();
            Label_MonsterName.Content   = $"Monster: {currentMonster.Name}";
            Label_MonsterHealth.Content = $"Health:{currentMonster.Health}";
        }
Пример #2
0
        private void Button_SelectPlayers_Click(object sender, RoutedEventArgs e)
        {
            playerQueue.Dequeue();
            playerQueue.Dequeue();
            playerQueue.Dequeue();
            playerQueue.Dequeue();

            PlayerSelect playerSelect = new PlayerSelect();

            playerSelect.ShowDialog();

            Label_P1Name.Content   = playerOne.Name;
            Label_P1Health.Content = $"Health :{playerOne.Health}";

            Label_P2Name.Content   = playerTwo.Name;
            Label_P2Health.Content = $"Health :{playerTwo.Health}";

            Label_P3Name.Content   = playerThree.Name;
            Label_P3Health.Content = $"Health :{playerThree.Health}";

            Label_P4Name.Content   = playerFour.Name;
            Label_P4Health.Content = $"Health :{playerFour.Health}";

            playerQueue.Enqueue(playerOne);
            playerQueue.Enqueue(playerTwo);
            playerQueue.Enqueue(playerThree);
            playerQueue.Enqueue(playerFour);
        }