private void tankButton_Click(object sender, EventArgs e) { Tank t = new Tank(player); player = t; player.addPlayer(t.getHealthDiff()); resultLabel.Text = "You have just added a tank to your party."; partyDescLabel.Text = "Your party contains " + player.ToString(); partyHealthLabel.Text = "Your party's cumulative health is " + player.getHealth(); }
private void healerButton_Click(object sender, EventArgs e) { Healer h = new Healer(player); player = h; player.addPlayer(h.getHealthDiff()); resultLabel.Text = "You have just added a healer to your party."; partyDescLabel.Text = "Your party contains " + player.ToString(); partyHealthLabel.Text = "Your party's cumulative health is " + player.getHealth(); }
private void ddButton_Click(object sender, EventArgs e) { DamageDealer dd = new DamageDealer(player); player = dd; player.addPlayer(dd.getHealthDiff()); resultLabel.Text = "You have just added a damage dealer to your party."; partyDescLabel.Text = "Your party contains " + player.ToString(); partyHealthLabel.Text = "Your party's cumulative health is " + player.getHealth(); }
public override void addPlayer(int healthDiff) { player.addPlayer(healthDiff); }