feat: visual test

This commit is contained in:
Gerard Gascón 2024-04-15 16:31:27 +02:00
parent 962db8d321
commit 0e7a535f6d
14 changed files with 1000 additions and 106 deletions

View file

@ -1,4 +1,4 @@
//#if !UNITY_EDITOR
#if !UNITY_EDITOR
using SatorImaging.AppWindowUtility;
using UnityEngine;
@ -9,9 +9,10 @@ namespace View {
AppWindowUtility.AlwaysOnTop = true;
AppWindowUtility.FrameVisibility = false;
Vector2Int resolution = new(360, 640);
//Vector2Int resolution = new(360, 640);
Vector2Int resolution = new(360, 540);
AppWindowUtility.ResizeWindowRelative(resolution.x, resolution.y);
}
}
}
//#endif
#endif

View file

@ -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;
}