Example #1
0
        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();
        }
Example #2
0
        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();
        }
Example #3
0
        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();
        }
Example #4
0
 public override void addPlayer(int healthDiff)
 {
     player.addPlayer(healthDiff);
 }