예제 #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();
        }
예제 #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();
        }
예제 #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();
        }
예제 #4
0
 public override int getHealth()
 {
     return(player.getHealth());
 }