Ejemplo n.º 1
0
        public CharacterSelect()
        {
            InitializeComponent();
            MessageBox.Show("Please select a character for each hero\r\n" +
                            "Select a character by clicking one radio button in each hero row\r\n" +
                            "indicating which character you would like to assign to each hero slot");
            btn_PartyReady.IsEnabled = false;
            _party = new Party();
            //paintRectanglesWithHeroImages();

            _TheHeroes = new Hero[4];

            btn_PartyReady.IsEnabled = true;


            Hero[] HeroChoices = new Hero[8];
            HeroChoices[0] = new ArmorKnight();
            HeroChoices[1] = new Cleric();
            HeroChoices[2] = new Monk();
            HeroChoices[3] = new Paladin();
            HeroChoices[4] = new Rogue();
            HeroChoices[5] = new Sorceress();
            HeroChoices[6] = new Swordsman();
            HeroChoices[7] = new Warlock();

            rect_HeroChoice1.Fill = HeroChoices[0].getImageBrush();
            rect_HeroChoice2.Fill = HeroChoices[1].getImageBrush();
            rect_HeroChoice3.Fill = HeroChoices[2].getImageBrush();
            rect_HeroChoice4.Fill = HeroChoices[3].getImageBrush();
            rect_HeroChoice5.Fill = HeroChoices[4].getImageBrush();
            rect_HeroChoice6.Fill = HeroChoices[5].getImageBrush();
            rect_HeroChoice7.Fill = HeroChoices[6].getImageBrush();
            rect_HeroChoice8.Fill = HeroChoices[7].getImageBrush();

            rect_HeroChoice1.ToolTip = HeroChoices[0].getDescription();
            rect_HeroChoice2.ToolTip = HeroChoices[1].getDescription();
            rect_HeroChoice3.ToolTip = HeroChoices[2].getDescription();
            rect_HeroChoice4.ToolTip = HeroChoices[3].getDescription();
            rect_HeroChoice5.ToolTip = HeroChoices[4].getDescription();
            rect_HeroChoice6.ToolTip = HeroChoices[5].getDescription();
            rect_HeroChoice7.ToolTip = HeroChoices[6].getDescription();
            rect_HeroChoice8.ToolTip = HeroChoices[7].getDescription();
        }
Ejemplo n.º 2
0
        private void cmbBox_Hero1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (cmbBox_Hero1.SelectedIndex.Equals(0))
            {
                _TheHeroes[0] = new ArmorKnight();
            }
            else if (cmbBox_Hero1.SelectedIndex.Equals(1))
            {
                _TheHeroes[0] = new Cleric();
            }
            else if (cmbBox_Hero1.SelectedIndex.Equals(2))
            {
                _TheHeroes[0] = new Monk();
            }
            else if (cmbBox_Hero1.SelectedIndex.Equals(3))
            {
                _TheHeroes[0] = new Paladin();
            }
            else if (cmbBox_Hero1.SelectedIndex.Equals(4))
            {
                _TheHeroes[0] = new Rogue();
            }
            else if (cmbBox_Hero1.SelectedIndex.Equals(5))
            {
                _TheHeroes[0] = new Sorceress();
            }
            else if (cmbBox_Hero1.SelectedIndex.Equals(6))
            {
                _TheHeroes[0] = new Swordsman();
            }
            else if (cmbBox_Hero1.SelectedIndex.Equals(7))
            {
                _TheHeroes[0] = new Warlock();
            }


            rect_Hero1.Fill         = _TheHeroes[0].getImageBrush();
            rect_Hero1.ToolTip      = _TheHeroes[0].getDescription();
            lbl_Hero1_Stats.Content = _TheHeroes[0].getStats();
        }