#0000 <-> #000f
public async Task FadeIn()
{
//using DG.Tweening;
//#0000 -> #000f
bool flg = true;
DOTween
.ToAlpha(() => panel.color = new Color(0, 0, 0, 0), c => panel.color = c, 1f, 0.3f)
.OnComplete(() => flg = false)
;
while (flg) await Task.Delay(5);
}
public async Task FadeOut()
{
//using DG.Tweening;
//#000f -> #0000
bool flg = true;
DOTween
.ToAlpha(() => panel.color = new Color(0, 0, 0, 1f), c => panel.color = c, 0f, 0.3f)
.OnComplete(() => flg = false)
;
while (flg) await Task.Delay(5);
}