public ObstacleSpawningController( ObstacleEntityFactory obstacleEntityFactory, ObstacleEntityConfig obstacleEntityConfig, ScreenSizeModel screenSizeModel) { _obstacleEntityFactory = obstacleEntityFactory; _obstacleEntityConfig = obstacleEntityConfig; _screenSizeModel = screenSizeModel; }
public ObstacleEntityFactory(ObstacleEntityConfig obstacleEntityConfig) { _obstacleEntityConfig = obstacleEntityConfig; var conversionSettings = GameObjectConversionSettings.FromWorld( World.DefaultGameObjectInjectionWorld, new BlobAssetStore().AddTo(Disposer)); // ToDo [ECS] Is this correct? _entityPrefabs = _obstacleEntityConfig.Prefabs .Select(prefab => GameObjectConversionUtility.ConvertGameObjectHierarchy( prefab, conversionSettings)) .ToList(); }