public EraseLineService( IBoard board, BoardPresenter boardPresenter, Score score, ScorePresenter scorePresenter ) { Board = board; BoardPresenter = boardPresenter; Score = score; ScorePresenter = scorePresenter; }
private void InitializeGameManager() { lvl = LvlManager.currentLvl; playerProgress = PlayerPrefs.GetInt("PlayerProgress", 0); switch (lvl) { case 0: asteroidType = AsteroidType.big; break; case 1: asteroidType = AsteroidType.medium; break; case 2: asteroidType = AsteroidType.small; break; default: asteroidType = AsteroidType.small; break; } points = new ReactiveProperty <int>(0); ssPresenter = new GameObject("SpaceshipPresenter").AddComponent <SpaceshipPresenter>(); scPresenter = new GameObject("ScorePresenter").AddComponent <ScorePresenter>(); scPresenter.SubscribeToManager(this); bulletPull = new GameObject("BulletPull").AddComponent <BulletPullPresenter>(); asteroidPull = new GameObject("AsteroidPull").AddComponent <AsteroidPullPresenter>(); asteroidPull.asteroidType = this.asteroidType; MessageBroker.Default .Receive <ScoringNotice>() .Subscribe(_ => { points.Value += (int)asteroidType; if (points.Value >= pointsToWin) { GameOver(true); } }) .AddTo(this); StartGame(); }
public MockScoreView() { Presenter = new ScorePresenter(this); }
public void MyTestInitialize() { _view = new MockScoreView(); _presenter = new ScorePresenter(_view); }