static void Run(HeroFactory heroFactory) { var hero = new Hero(heroFactory); hero.Run(); hero.Hit(); }
public Hero(HeroFactory factory) { weapon = factory.CreateWeapon(); movement = factory.CreateMovement(); }
static void Run(HeroFactory heroFactory) { var hero = new Hero(heroFactory); hero.Run(); hero.Hit(); }
public Hero(HeroFactory factory) { weapon = factory.CreateWeapon(); movement = factory.CreateMovement(); }