public void DoShowBegin(TransitionBase transition, TransitionInputParameters transitionParameters, AppearanceParameters parameters) { var needToPlay = (this.id > 0 || this.playType == PlayType.Replace); if (this.playType == PlayType.Replace) { WindowSystem.AudioStop(null, this.clipType, this.id); } if (transition != null) { if (needToPlay == true) { WindowSystem.AudioPlay(this.window, this.clipType, this.id, this.playType == PlayType.Replace); transition.SetResetState(transitionParameters, this.window, null); transition.Play(null, this.window, transitionParameters, forward: true, callback: () => { parameters.Call(); }); } } else { if (needToPlay == true) { WindowSystem.AudioPlay(this.window, this.clipType, this.id, this.playType == PlayType.Replace); } parameters.Call(); } }
public void OnHideBegin(TransitionBase transition, TransitionInputParameters transitionParameters, System.Action callback) { if (transition != null) { transition.Play(this.window, transitionParameters, null, forward: false, callback: () => { WindowSystem.AudioStop(this.window, this.clipType, this.id); if (callback != null) callback(); }); } else { WindowSystem.AudioStop(this.window, this.clipType, this.id); if (callback != null) callback(); } }
public void OnShowBegin(TransitionBase transition, TransitionInputParameters transitionParameters, System.Action callback) { if (transition != null) { WindowSystem.AudioPlay(this.window, this.clipType, this.id); transition.SetResetState(transitionParameters, this.window, null); transition.Play(this.window, transitionParameters, null, forward: true, callback: () => { if (callback != null) callback(); }); } else { WindowSystem.AudioPlay(this.window, this.clipType, this.id); if (callback != null) callback(); } }
public void OnHideBegin(TransitionBase transition, TransitionInputParameters transitionParameters, System.Action callback) { var newWindow = WindowSystem.GetCurrentWindow(); if (newWindow == null) return; if (transition != null) { if (newWindow.audio.id > 0 || newWindow.audio.playType == PlayType.Replace) { transition.Play(this.window, transitionParameters, null, forward: false, callback: () => { WindowSystem.AudioStop(this.window, this.clipType, this.id); if (callback != null) callback(); }); } } else { if (newWindow.audio.id > 0 || newWindow.audio.playType == PlayType.Replace) WindowSystem.AudioStop(this.window, this.clipType, this.id); if (callback != null) callback(); } }
public void DoShowBegin(TransitionBase transition, TransitionInputParameters transitionParameters, AppearanceParameters parameters) { var needToPlay = (this.id > 0 || this.playType == PlayType.Replace); if (this.playType == PlayType.Replace) WindowSystem.AudioStop(null, this.clipType, this.id); if (transition != null) { if (needToPlay == true) { WindowSystem.AudioPlay(this.window, this.clipType, this.id, this.playType == PlayType.Replace); transition.SetResetState(transitionParameters, this.window, null); transition.Play(this.window, transitionParameters, null, forward: true, callback: () => { parameters.Call(); }); } } else { if (needToPlay == true) WindowSystem.AudioPlay(this.window, this.clipType, this.id, this.playType == PlayType.Replace); parameters.Call(); } }