public PlayerSpawningController( PlayerEntityFactory playerEntityFactory, PlayerEntityConfig playerEntityConfig, FloorTileEntityConfig floorTileEntityConfig, ScreenSizeModel screenSizeModel) { _playerEntityFactory = playerEntityFactory; _playerEntityConfig = playerEntityConfig; _floorTileEntityConfig = floorTileEntityConfig; _screenSizeModel = screenSizeModel; }
public PlayerEntityFactory(PlayerEntityConfig playerEntityConfig) { _playerEntityConfig = playerEntityConfig; var settings = GameObjectConversionSettings.FromWorld( World.DefaultGameObjectInjectionWorld, new BlobAssetStore().AddTo(Disposer)); // ToDo [ECS] Is this correct? _playerEntityPrefab = GameObjectConversionUtility.ConvertGameObjectHierarchy( _playerEntityConfig.PlayerEntityPrefab, settings); _floorColliderEntityPrefab = GameObjectConversionUtility.ConvertGameObjectHierarchy( _playerEntityConfig.FloorColliderPrefab, settings); }