private void Construct(BgmController bgmController, SeController seController, ISaveSoundUseCase saveSoundUseCase) { bgmSlider .OnPointerUpAsObservable() .Subscribe(_ => { saveSoundUseCase.SaveBgmVolume(bgmController.GetVolume()); }) .AddTo(bgmSlider); seSlider .OnPointerUpAsObservable() .Subscribe(_ => { seController.PlaySe(SeType.Decision); saveSoundUseCase.SaveSeVolume(seController.GetVolume()); }) .AddTo(seSlider); bgmController.SetVolume(saveSoundUseCase.bgmVolume); seController.SetVolume(saveSoundUseCase.seVolume); SetSliderVolume(bgmController, seController); UpdateVolume(bgmController, seController); }
public override async UniTask <GameState> TickAsync(CancellationToken token) { _seController.PlaySe(SeType.StageClear); await _clearView.ShowAsync(token); await UniTask.Delay(TimeSpan.FromSeconds(CommonViewConfig.LOAD_INTERVAL), cancellationToken : token); switch (_gameType) { case GameType.ScoreAttack: _clearDataUseCase.SaveScoreAttackData(); _sceneLoader.LoadScene(_gameType, SceneName.Main, LoadType.Next); break; case GameType.FreePlay: _clearDataUseCase.SaveFreePlayClearData(); _freePlayNextView.ShowAsync(token).Forget(); break; case GameType.None: default: throw new ArgumentOutOfRangeException(); } return(GameState.None); }
private async UniTaskVoid UpdateLevelAsync(int level, CancellationToken token) { if (level != 0 && _isPlayLevelUpSe) { await UniTask.Delay(TimeSpan.FromSeconds(CommonViewConfig.FADE_TIME), cancellationToken : token); await UniTask.Delay(TimeSpan.FromSeconds(CommonViewConfig.LOAD_INTERVAL * 0.5f), cancellationToken : token); _seController.PlaySe(SeType.LevelUp); } stageLevelText.text = $"{(level + 1).ToString(_digit)}"; }
public async UniTaskVoid ShowAsync(CancellationToken token) { textColorAnimator.Play(); var delayTime = CommonViewConfig.FADE_TIME - 0.1f; _seController.DelayPlaySeAsync(SeType.Transition, delayTime, token).Forget(); await( leftSide .DOAnchorPosX(80.0f, CommonViewConfig.FADE_TIME) .SetEase(Ease.InQuart) .WithCancellation(token), rightSide .DOAnchorPosX(-80.0f, CommonViewConfig.FADE_TIME) .SetEase(Ease.InQuart) .WithCancellation(token) ); await UniTask.Delay(TimeSpan.FromSeconds(CommonViewConfig.FADE_TIME), cancellationToken : token); await clearText .DOAnchorPosY(35.0f, CommonViewConfig.FADE_TIME) .SetEase(Ease.Linear) .WithCancellation(token); await UniTask.Delay(TimeSpan.FromSeconds(CommonViewConfig.FADE_TIME), cancellationToken : token); foreach (var nextButtonView in _nextButtonViews) { _seController.PlaySe(SeType.PopButton); nextButtonView.SetInteractable(true); nextButtonView.FadeOut(); await UniTask.Delay(TimeSpan.FromSeconds(0.1f), cancellationToken : token); } ActivateAllButton(true); }
public void Play() { _seController.PlaySe(buttonType); }