Ejemplo n.º 1
0
 public Swordbeard(HumanWarrior humanWarrior)
 {
     Attack  = 40 + humanWarrior.Attack;
     Defence = 40 + humanWarrior.Defence;
     Speed   = humanWarrior.Speed - 10;
     Hp      = 50 + humanWarrior.Hp;
 }
Ejemplo n.º 2
0
 public Archer(HumanWarrior humanWarrior)
 {
     Attack  = 20 + humanWarrior.Attack;
     Defence = 10 + humanWarrior.Defence;
     Speed   = humanWarrior.Speed + 20;
     Hp      = 50 + humanWarrior.Hp;
 }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Human        h   = new Human();
            HumanWarrior hw  = new HumanWarrior(h);
            Swordbeard   sb  = new Swordbeard(hw);
            HumanWarrior hw2 = new HumanWarrior(h);
            Swordbeard   sb2 = new Swordbeard(hw2);

            h.Operation();
        }