工具栏修改

This commit is contained in:
Caiyanpeng committed 2022-01-11 16:21:13 +08:00
1 parent 05e3d2f887
commit 5672898ce4
5 files changed
+235 -13

No files matched your search

+19 -2
View File
@@ -41,7 +41,7 @@ public class MainNav : MonoBehaviour
#if UNITY_ANDROID || UNITY_IOS
UIManager.AddEvent(transform.Find("Delay").gameObject, EventTriggerType.PointerClick, b =>
{
delayTime = 3;
delayTime = 3;
transform.Find("Delay/Tooltips").gameObject.SetActive(true);
transform.Find("Delay/Tooltips").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
});
@@ -57,7 +57,22 @@ public class MainNav : MonoBehaviour
{
UIManager.ShowPrePanel();
});
UIManager.AddEvent(transform.Find("Delay").gameObject, EventTriggerType.PointerClick, x =>
{
var tooltips = transform.Find("Delay/Tooltips").gameObject;
if (tooltips.activeInHierarchy)
{
DOTween.CompleteAll(true);
tooltips.SetActive(false);
}
else
{
DOTween.CompleteAll(true);
tooltips.SetActive(true);
tooltips.GetComponent<CanvasGroup>().alpha = 0f;
tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
}
});
UIManager.AddEvent(transform.Find("Setting").gameObject, EventTriggerType.PointerClick, x =>
{
UIManager.ShowSettingModal();
@@ -94,6 +109,7 @@ public class MainNav : MonoBehaviour
// Update is called once per frame
void Update()
{
#if UNITY_ANDROID || UNITY_IOS
if (delayTime < 0)
{
Debug.Log("小时");
@@ -108,6 +124,7 @@ public class MainNav : MonoBehaviour
Debug.Log(delayTime);
delayTime -= Time.deltaTime;
}
#endif
}
public void ShowExit()