/// <summary> /// display your second ally /// </summary> /// <param name="x"></param> public void setSecondAlly(Hero x) { Ally2.Text = x + "\r\n" + x.stats(); if (x is Healer) { Ally2Image.Image = Properties.Resources.Healer; } if (x is Theif) { Ally2Image.Image = Properties.Resources.Thief; } if (x is Rogue) { Ally2Image.Image = Properties.Resources.Rogue; } if (x is Wizard) { Ally2Image.Image = Properties.Resources.Wizard; } if (x is Guard) { Ally2Image.Image = Properties.Resources.Guard; } if (x is Scout) { Ally2Image.Image = Properties.Resources.Scout; } Ally2Health.Maximum = x.maxhealth; Ally2Health.Value = x.health; }
/// <summary> /// display yourself /// </summary> /// <param name="x"></param> public void setYou(Hero x) { You.Text = x + "\r\n" + x.stats(); if (x is Warrior) { YouImage.Image = Properties.Resources.Warrior; } if (x is Archer) { YouImage.Image = Properties.Resources.Archer; } if (x is Mage) { YouImage.Image = Properties.Resources.Mage; } YourHealth.Maximum = x.maxhealth; YourHealth.Value = x.health; }