public override void OnPlay(WindowBase window, object tag, TransitionInputParameters parameters, WindowComponentBase root, bool forward, System.Action callback) { var param = this.GetParams <Parameters>(parameters); if (param == null) { if (callback != null) { callback(); } return; } var duration = this.GetDuration(parameters, forward); var resultState = param.GetResult(forward); var rect = this.GetRoot(param, window); var state = new Parameters.State(rect); var material = param.GetMaterialInstance(); if (TweenerGlobal.instance != null) { TweenerGlobal.instance.removeTweens(tag); TweenerGlobal.instance.addTween(rect, duration, 0f, 1f).onUpdate((obj, value) => { if (obj != null) { param.Apply(material, obj, state, resultState, value); } }).onComplete((obj) => { if (callback != null) { callback(); } CanvasUpdater.ForceUpdate(); }).onCancel((obj) => { if (callback != null) { callback(); } CanvasUpdater.ForceUpdate(); }).tag(tag).ease(ME.Ease.GetByType(forward == true ? param.inEase : param.outEase)); } else { param.Apply(material, rect, resultState); if (callback != null) { callback(); } CanvasUpdater.ForceUpdate(); } }
public override void Set(WindowBase window, TransitionInputParameters parameters, WindowComponentBase root, bool forward, float value) { var param = this.GetParams <Parameters>(parameters); if (param == null) { return; } var source = this.GetRoot(param, window); var state = new Parameters.State(source); var resultState = param.GetResult(forward); param.Apply(source, state, resultState, ME.Ease.GetByType(forward == true ? param.inEase : param.outEase).interpolate(0f, 1f, value, 1f)); }
public override void Set(WindowBase window, TransitionInputParameters parameters, WindowComponentBase root, bool forward, float value) { var param = this.GetParams <Parameters>(parameters); if (param == null) { return; } //var duration = this.GetDuration(parameters, forward); var rect = this.GetRoot(param, window); var state = new Parameters.State(rect); var resultState = param.GetResult(forward); var material = param.GetMaterialInstance(); param.Apply(material, rect, state, resultState, ME.Ease.GetByType(forward == true ? param.inEase : param.outEase).interpolate(0f, 1f, value, 1f)); }
public override void OnPlay(WindowBase window, object tag, TransitionInputParameters parameters, WindowComponentBase root, bool forward, System.Action callback) { var param = this.GetParams<Parameters>(parameters); if (param == null) { if (callback != null) callback(); return; } var duration = this.GetDuration(parameters, forward); var resultState = param.GetResult(forward); var rect = this.GetRoot(param, window); var state = new Parameters.State(rect); var material = param.GetMaterialInstance(); if (TweenerGlobal.instance != null) { //TweenerGlobal.instance.removeTweens(tag); TweenerGlobal.instance.addTween(rect, duration, 0f, 1f).onUpdate((obj, value) => { if (obj != null) { param.Apply(material, obj, state, resultState, value); } }).onComplete((obj) => { if (callback != null) callback(); CanvasUpdater.ForceUpdate(); }).onCancel((obj) => { if (callback != null) callback(); CanvasUpdater.ForceUpdate(); }).tag(tag).ease(ME.Ease.GetByType(forward == true ? param.inEase : param.outEase)); } else { param.Apply(material, rect, resultState); if (callback != null) callback(); CanvasUpdater.ForceUpdate(); } }
public override void Set(WindowBase window, TransitionInputParameters parameters, WindowComponentBase root, bool forward, float value) { var param = this.GetParams<Parameters>(parameters); if (param == null) { return; } //var duration = this.GetDuration(parameters, forward); var rect = this.GetRoot(param, window); var state = new Parameters.State(rect); var resultState = param.GetResult(forward); var material = param.GetMaterialInstance(); param.Apply(material, rect, state, resultState, ME.Ease.GetByType(forward == true ? param.inEase : param.outEase).interpolate(0f, 1f, value, 1f)); }
public override void Set(WindowBase window, TransitionInputParameters parameters, WindowComponentBase root, bool forward, float value) { var param = this.GetParams<Parameters>(parameters); if (param == null) { return; } var source = this.GetRoot(param, window); var state = new Parameters.State(source); var resultState = param.GetResult(forward); param.Apply(source, state, resultState, ME.Ease.GetByType(forward == true ? param.inEase : param.outEase).interpolate(0f, 1f, value, 1f)); }