1. 程式人生 > >UGUI DOTween漸隱漸現

UGUI DOTween漸隱漸現

Tween tweenAlpha;

tweenAlpha = DOTween.To(() => MaskSpr.fillAmount, x => MaskSpr.fillAmount = x, 1f, RISE_TIME).OnComplete(() =>
					                                                                                                     {
						tweenAlpha = DOTween.ToAlpha(() => MaskSpr.color, x => MaskSpr.color = x, 0f, DISAPPEAR_TIME).OnComplete(() =>
						                                                                                           {
							tweenAlpha = DOTween.ToAlpha(() => MaskSpr.color, x => MaskSpr.color = x, 1f, APPEAR_TIME).OnComplete(() =>{
								State = SelState.done;
							});
						});
					});