protected virtual void InitializeUnits() { var defaultUnitVisualFactory = new DefaultUnitVisual.Factory(_prefab); var defaultUnitFactory = new DefaultUnit.Factory(_base); var defaultUnitSpawner = new DefaultUnitSpawner(defaultUnitVisualFactory, defaultUnitFactory); var spawnUnitWaveBehaviour = new DefaultSpawnUnitWaveBehaviour(defaultUnitSpawner, _unitSettings, _unitUpgradeSettings, _unitPaths, transform); _unitWavesController = new UnitWavesController(spawnUnitWaveBehaviour, _waveSettings); }
public DefaultSpawnUnitWaveBehaviour(DefaultUnitSpawner spawner, UnitSettings unitSettings, UnitSettings unitUpgradeSettings, UnitPath[] paths, Transform parent) { _paths = paths; _parent = parent; _unitSettings = unitSettings; _unitUpgradeSettings = unitUpgradeSettings; _defaultUnitSpawner = spawner; }