Merge remote-tracking branch 'origin/dev_nonearth' into dev_cyp
# Conflicts: # Assets/Scenes/Login-Mobile.unity # Assets/Scripts/UI/Prefab/Panel/NewRouteDetailController.cs
This commit is contained in:
commit
f23fc4b4c0
45 files changed
+4765
-1412
No files matched your search
@@ -8,6 +8,7 @@ using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.Events;
|
||||
using DG.Tweening;
|
||||
using System.Timers;
|
||||
|
||||
namespace Assets.Scripts.UI.Control
|
||||
{
|
||||
@@ -119,8 +120,18 @@ namespace Assets.Scripts.UI.Control
|
||||
}
|
||||
}
|
||||
public bool showTooltip { get; set; }
|
||||
|
||||
private void BindEvent()
|
||||
{
|
||||
Timer timer = new Timer();
|
||||
timer.Interval = 1000;
|
||||
var group = tooltips.GetComponent<CanvasGroup>();
|
||||
timer.Elapsed += (r, s) =>
|
||||
{
|
||||
timer.Stop();
|
||||
group.DOFade(1, 0.5f);
|
||||
};
|
||||
|
||||
//鼠标进入
|
||||
UIManager.AddEvent(this.gameObject, EventTriggerType.PointerEnter, new UnityEngine.Events.UnityAction<UnityEngine.EventSystems.BaseEventData>(e =>
|
||||
{
|
||||
@@ -135,7 +146,7 @@ namespace Assets.Scripts.UI.Control
|
||||
#endif
|
||||
tooltips.GetComponent<CanvasGroup>().alpha = 0f;
|
||||
tooltips.SetActive(true);
|
||||
tooltips.GetComponent<CanvasGroup>().DOFade(1f, 0.2f);
|
||||
timer.Start();
|
||||
}
|
||||
switch (mType)
|
||||
{
|
||||
@@ -164,14 +175,17 @@ namespace Assets.Scripts.UI.Control
|
||||
UIManager.AddEvent(this.gameObject, EventTriggerType.PointerExit, new UnityAction<BaseEventData>(e =>
|
||||
{
|
||||
if (!this.isActiveAndEnabled) return;
|
||||
timer.Stop();
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
if (!string.IsNullOrWhiteSpace(Tooltips))
|
||||
{
|
||||
#else
|
||||
if (!string.IsNullOrWhiteSpace(Tooltips) && showTooltip)
|
||||
{
|
||||
#endif
|
||||
tooltips.SetActive(false);
|
||||
#endif
|
||||
group.DOFade(0, 1f).onComplete += () => {
|
||||
tooltips.SetActive(false);
|
||||
};
|
||||
}
|
||||
//Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
switch (mType)
|
||||
|
||||
Reference in new issue
Block a user