feat: visual test
This commit is contained in:
parent
962db8d321
commit
0e7a535f6d
14 changed files with 1000 additions and 106 deletions
|
@ -10,16 +10,19 @@ namespace View {
|
|||
[SerializeField] private float fadeDuration = .5f;
|
||||
|
||||
private bool _wasVisible = true;
|
||||
private Tween _fadeTween;
|
||||
|
||||
private void Update() {
|
||||
bool isPointerOver = EventSystem.current.IsPointerOverGameObject();
|
||||
if (_wasVisible && !isPointerOver) {
|
||||
ui.DOFade(0, fadeDuration).SetDelay(5f);
|
||||
_fadeTween?.Kill();
|
||||
_fadeTween = ui.DOFade(0, fadeDuration).SetDelay(5f);
|
||||
_wasVisible = false;
|
||||
return;
|
||||
}
|
||||
if (!_wasVisible && isPointerOver) {
|
||||
ui.DOFade(1, fadeDuration);
|
||||
_fadeTween?.Kill();
|
||||
_fadeTween = ui.DOFade(1, fadeDuration);
|
||||
_wasVisible = true;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue