PC点击区域&PFbutton微调

This commit is contained in:
lishuo committed 2022-01-25 11:17:42 +08:00
1 parent 5340d3d58b
commit 37873427e3
2 files changed
+106 -27

No files matched your search

+26 -22
View File
@@ -136,7 +136,7 @@ namespace Assets.Scripts.UI.Control
{
Debug.Log(131);
timer.Stop();
group.DOFade(1, 1f);
};
//鼠标进入
@@ -151,26 +151,28 @@ namespace Assets.Scripts.UI.Control
if (!string.IsNullOrWhiteSpace(Tooltips) && showTooltip)
{
#endif
//tooltips.SetActive(true);
//tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
//tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
//DOTween.CompleteAll(true);
se = DOTween.Sequence();
se.SetDelay(1);
se.AppendCallback(() =>
{
if(a!=null) a.Complete(true);
if (b != null) b.Complete(true);
tooltips.SetActive(true);
tooltips.GetComponent<CanvasGroup>().alpha = 0f;
c = tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
});
a = se.Play();
//se = DOTween.Sequence();
//se.SetDelay(1);
//se.AppendCallback(() =>
//{
// if(a!=null) a.Complete(true);
// if (b != null) b.Complete(true);
// tooltips.SetActive(true);
// tooltips.GetComponent<CanvasGroup>().alpha = 0f;
// c = tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
//});
//a = se.Play();
tooltips.SetActive(true);
tooltips.GetComponent<CanvasGroup>().alpha = 0f;
//StartCoroutine(DelayShowTooltip());
//timer.Start();
timer.Start();
}
switch (mType)
{
@@ -207,10 +209,7 @@ namespace Assets.Scripts.UI.Control
if (!string.IsNullOrWhiteSpace(Tooltips) && showTooltip)
{
#endif
if (a != null) a.Complete(true);
if (c != null) c.Complete(true);
b = group.DOFade(0, 1f);
b.onComplete += () => {
group.DOFade(0, 1f).onComplete += () => {
tooltips.SetActive(false);
};
}
@@ -242,9 +241,9 @@ namespace Assets.Scripts.UI.Control
UIManager.AddEvent(this.gameObject, EventTriggerType.PointerDown, new UnityEngine.Events.UnityAction<BaseEventData>(e =>
{
if (!this.isActiveAndEnabled) return;
if (a != null) a.Complete(true);
if (b != null) b.Complete(true);
if (c != null) c.Complete(true);
//if (a != null) a.Complete(true);
//if (b != null) b.Complete(true);
//if (c != null) c.Complete(true);
tooltips.SetActive(false);
//else
@@ -273,6 +272,11 @@ namespace Assets.Scripts.UI.Control
image.color = ConvertColor("#BD2255");
}
break;
case Type.Image:
{
tooltips.SetActive(tooltips.activeSelf);
}
break;
default:
break;
}
@@ -304,7 +308,7 @@ namespace Assets.Scripts.UI.Control
break;
case Type.Image:
{
//tooltips.SetActive(false);
tooltips.SetActive(false);
}
break;
default: