private void Start()
        {
            _stageManager.ShippingPartsAsObservable
            .TakeUntil(_gameStateManager
                       .CurrentState
                       .FirstOrDefault(x => x == GameState.FINISHED))
            .Subscribe(CalculateScore);

            _totalScore.SkipLatestValueOnSubscribe()
            .DistinctUntilChanged()
            .Subscribe(_ => _audioManager.PlayPointUp());
        }
Esempio n. 2
0
    private void Start()
    {
        gimmickManager = GetComponent <GimmickManager>();
        audioManager   = GetComponent <AudioManagerComponent>();

        CurrentSceneState.Subscribe(state =>
        {
            OnStateChanged(state);
        });

        playerLife
        .SkipLatestValueOnSubscribe()
        .Subscribe(x =>
        {
            ChangeScene(SceneState.Life);
        });
    }