示例#1
0
        private void Construct(SignalBus signalBus, IWavesCounter wavesCounter, IScoreProvider scoreProvider, IHighScoresKeeper highScoresKeeper)
        {
            this.signalBus        = signalBus;
            this.scoreProvider    = scoreProvider;
            this.highScoresKeeper = highScoresKeeper;
            this.wavesCounter     = wavesCounter;

            signalBus.Subscribe <PlayerDiedSignal>(OnPlayerDied);
        }
示例#2
0
        private void Construct(SignalBus signalBus,
                               IPlayerConfiguration playerConfiguration,
                               IHighScoresKeeper highScoresKeeper,
                               IWavesCounter wavesCounter)
        {
            this.signalBus   = signalBus;
            playerLives.text = playerConfiguration.LivesTotal.ToString();
            highScore.text   = highScoresKeeper.GetCurrenHighScore().ToString();
            waveNumber.text  = wavesCounter.GetCurrentWaveNumber().ToString();

            signalBus.Subscribe <PlayerLivesAmountChangedSignal>(OnPlayerLivesChanged);
            signalBus.Subscribe <PlayerScoreChangedSignal>(OnPlayerScoreChanged);
            signalBus.Subscribe <WaveSpawnedSignal>(OnWaveSpawned);
        }
示例#3
0
 void Construct(IHighScoresKeeper highScoresKeeper, SignalBus signalBus)
 {
     this.highScoresKeeper = highScoresKeeper;
     this.signalBus        = signalBus;
 }
 private void Construct(IHighScoresKeeper highScoresKeeper)
 {
     this.highScoresKeeper = highScoresKeeper;
 }