public GameBuilder(GameObject gameObject, ISetting setting, IParticleSpawner particleSpawner, IBlockColorRepository blockColorRepository, List <IGroupPattern> groupPatterns, IBackgroundFactory backgroundFactory, ICameraManager cameraManager, IBlockViewSpawner blockViewSpawner, IFloatingTextRenderer floatingTextRenderer) { gameObject.transform.localScale = new Vector3(setting.ScalePerBlock, setting.ScalePerBlock, 1); setting.Parent = gameObject.transform; setting.ParticleSpawner = particleSpawner; setting.BlockColorRepository = blockColorRepository; setting.FloatingTextRenderer = floatingTextRenderer; _gameObject = gameObject; _setting = setting; _groupPatterns = groupPatterns; _backgroundFactory = backgroundFactory; _cameraManager = cameraManager; _blockViewSpawner = blockViewSpawner; }
public void Init() { testSetting = TestSetting.Get(); game = new Game(testSetting); cameraManager = Substitute.For<ICameraManager>(); backgroundFactory = Substitute.For<IBackgroundFactory>(); gridFactory = Substitute.For<IGridFactory>(); groupFactory = Substitute.For<IGroupFactory>(); game.CameraManager = cameraManager; game.BackgroundFactory = backgroundFactory; game.GridFactory = gridFactory; game.GroupFactory = groupFactory; }