示例#1
0
 //  В конструктор передаем фабрику героев
 public Hero(HeroFactory factory)
 {
     _weapon   = factory.CreatWeapon();
     _movement = factory.CreateMovement();
 }
 public Hero(HeroFactory factory)
 {
     weapon   = factory.CreateWeapon();
     movement = factory.CreateMovement();
 }