Exemplo n.º 1
0
 public Hero(HeroFactory factory)
 {
     weapon   = factory.CreateWeapon();
     movement = factory.CreateMovement();
 }
Exemplo n.º 2
0
 //  В конструктор передаем фабрику героев
 public Hero(HeroFactory factory)
 {
     _weapon   = factory.CreatWeapon();
     _movement = factory.CreateMovement();
 }
Exemplo n.º 3
0
 public Hero(HeroFactory factory)
 {
     abillity1 = factory.CreateAbility1();
     abillity2 = factory.CreateAbility2();
 }