private void Start() { var heroFactory = new HeroFactory(Instantiate(heroesConfiguration)); var weaponFactory = new WeaponFactory(Instantiate(weaponsConfiguration)); var halloweenWeaponFactory = new WeaponFactory(Instantiate(halloweenWeaponsConfiguration)); var consumerGameObject = new GameObject(); consumer = consumerGameObject.AddComponent <Consumer>(); battleFactory = new BattleFactory(heroFactory, weaponFactory); halloweenBattleFactory = new BattleFactory(heroFactory, halloweenWeaponFactory); consumer.Configure(battleFactory); }
public void Configure(BattleFactory battleFactory) { currentBattleFactory = battleFactory; }