public static Tween To(this PostEffectWrapper self, float endValue, float duration) { return(DOTween.To ( self.GetVolume, self.SetVolume, endValue, duration )); }
public IObservable <Unit> OnTransitionStart(SceneTransition sceneTransition) { PostEffectWrapper noise = CameraController.Current?.AfterEffects?.Find("Noise"); if (noise != null) { DOTween.To(noise.GetVolume, noise.SetVolume, 0, 1); } var curtain = Object.Instantiate(curtain4SceneEnd, sceneTransition.transform); return(curtain.OnMoveEnd); }
void Start() { foreach (FocusNode node in AllNodes) { node.OnFocused .Subscribe(_ => { waku.ChangeFocus(node.GetComponent <RectTransform>()); soundGroup.Play("Move"); }) .AddTo(this); } draft1.OnFocused.Skip(1).Subscribe(_ => bgChanger.OnChangeStage(0)); draft2.OnFocused.Subscribe(_ => bgChanger.OnChangeStage(1)); draft3.OnFocused.Subscribe(_ => bgChanger.OnChangeStage(2)); // ステージ選択 AllStages.ForEach((stage, i) => { Selected(stage) .Subscribe(_ => { OnDetermine(i); }) .AddTo(this); }); // ランキング Selected(goToRankings) .Subscribe(_ => { soundGroup.Play("Enter"); ExitMain(); DOVirtual.DelayedCall(0.3f, () => _OnGoToRankings.OnNext(Unit.Default)); }) .AddTo(this); // 設定 Selected(goToConfig) .Subscribe(_ => { soundGroup.Play("Enter"); ExitMain(); DOVirtual.DelayedCall(0.3f, () => _OnGoToConfig.OnNext(Unit.Default)); }) .AddTo(this); vignette = afterEffects.Find("VignetteInStageSelect"); vignette.SetVolume(0); }
public void OnNextSceneStart(SceneTransition sceneTransition) { Object.Instantiate(curtain4SceneStart, sceneTransition.transform); PostEffectWrapper noise = CameraController.Current?.AfterEffects?.Find("Noise"); if (noise is null) { return; } noise.SetVolume(0); DOTween.To(noise.GetVolume, noise.SetVolume, 1, 1); }
void Start() { draftPEffect = CameraController.Current.AfterEffects.Find("Draft"); windsManager.Init ( () => new HeroInfo { pos = hero.Transform.position, velocity = hero.velocity.ToVector2() }, () => hero.TimeManager.DeltaTimeAroundHero, () => hero.TimeManager.TimeAroundHero ); Pauser.Instance.OnPause .Subscribe(_ => OnPause()); Pauser.Instance.OnPauseEnd .Subscribe(_ => OnPauseEnd()); }
public void OnNextSceneStart(SceneTransition sceneTransition) { float duration = 3; Material whiteOutMat = whiteOutImage.material; whiteOutMat.SetFloat("_Alpha", 1f); whiteOutMat.SetFloat("_Whiteness", 1); whiteOutMat.To("_Alpha", 0, duration); whiteOutMat.To("_Whiteness", 0.05f, duration).SetEase(Ease.OutCubic); PostEffectWrapper noise = CameraController.Current?.AfterEffects?.Find("Noise"); if (noise is null) { return; } noise.SetVolume(0); DOTween.To(noise.GetVolume, noise.SetVolume, 1, 1); }
void RearrangeBuffers(PostEffectWrapper dirty) { if (dirty.IsActive) { effects.Reverse() .TakeWhile(ef => ef != dirty) .Where(ef => ef.IsActive) .ForEach(ef => ef.RemoveCommandBuf()); dirty.ApplyCommandBuf(); effects .SkipWhile(ef => ef != dirty) .Skip(1) .Where(ef => ef.IsActive) .ForEach(ef => ef.ApplyCommandBuf()); } else { dirty.RemoveCommandBuf(); } }
public IObservable <Unit> OnTransitionStart(SceneTransition sceneTransition) { const float duration = 5f; PostEffectWrapper noise_ = CameraController.Current?.AfterEffects?.Find("Noise"); if (noise_ != null) { DOTween.To(noise_.GetVolume, noise_.SetVolume, 0, duration / 2); } var onEnd = new Subject <Unit>(); Material whiteOutMat = whiteOutImage.material; whiteOutMat.SetFloat("_Alpha", 0.3f); whiteOutMat.SetFloat("_Whiteness", 0.05f); whiteOutMat.To("_Alpha", 1, duration / 1.5f); whiteOutMat.To("_Whiteness", 0.9f, duration).SetEase(Ease.InOutCubic) .onComplete += () => onEnd.OnNext(Unit.Default); return(onEnd); }
public IObservable <Unit> OnTransitionStart(SceneTransition sceneTransition) { PostEffectWrapper noise = CameraController.Current?.AfterEffects?.Find("Noise"); if (noise != null) { DOTween.To(noise.GetVolume, noise.SetVolume, 0, 2f); } var end = new Subject <Unit>(); DOVirtual.DelayedCall(1.2f, () => { var windblur = Object.Instantiate(windAndBlur, sceneTransition.transform.parent); windblur.OnEnd.Subscribe(ss => { scSho = ss; end.OnNext(Unit.Default); }); windblur.transform.SetAsLastSibling(); }); return(end); }
void Start() { vignette = CameraController.Current.AfterEffects.Find("Vignette"); blurY = CameraController.Current.AfterEffects.Find("BlurEdge1"); blurT = CameraController.Current.AfterEffects.Find("BlurEdge2"); }
public void OnNextSceneStart(SceneTransition sceneTransition) { PostEffectWrapper noise = CameraController.Current?.AfterEffects?.Find("Noise"); noise?.SetVolume(1); }