修改nav;增加消息弹窗

This commit is contained in:
Caiyanpeng committed 2022-01-07 11:05:32 +08:00
1 parent 2d38b63c91
commit f5385e31d6
24 files changed
+2061 -1505

No files matched your search

+13 -5
View File
@@ -20,6 +20,7 @@ public class PropNames
}
public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,IPointerUpHandler
{
public bool isModal = false;
float width;
float height;
void Awake()
@@ -88,8 +89,12 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
// }
// SceneManager.LoadScene("Ride");
//});
transform.GetComponent<Button>().onClick.RemoveAllListeners();
transform.GetComponent<Button>().onClick.AddListener(Ride);
if (!isModal)
{
transform.GetComponent<Button>().onClick.RemoveAllListeners();
transform.GetComponent<Button>().onClick.AddListener(Ride);
}
transform.Find("Name").GetComponent<Text>().text = myMap.Name;
transform.Find("IdContainer/Text").GetComponent<Text>().text = $"#{myMap.Id}";
@@ -106,8 +111,11 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
diff.Find("Text").GetComponent<Text>().text = myMap.Hard;
tabContainer.Find("3d").gameObject.SetActive(myMap.Enable3D);
tabContainer.Find("Country").GetComponent<RawImage>().texture = UIManager.Instance.loginRegOptions.GetCountryImage(myMap.CountryCode);
transform.Find("CollectImg").GetComponent<Button>().onClick.RemoveAllListeners();
transform.Find("CollectImg").GetComponent<Button>().onClick.AddListener(Collect);
if (!isModal)
{
transform.Find("CollectImg").GetComponent<Button>().onClick.RemoveAllListeners();
transform.Find("CollectImg").GetComponent<Button>().onClick.AddListener(Collect);
}
transform.Find("CollectImg").Find("Image").GetComponent<Image>().sprite =
UIManager.Instance.collectDict[myMap.IsFavorite];
#if !(UNITY_ANDROID || UNITY_IOS)
@@ -121,7 +129,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
SetActive4Button(false);
#if UNITY_ANDROID || UNITY_IOS
var isRecent = App.CurrentRouteType == "Recent Routes" && myMap.RecentRecord != null && myMap.RecentRecord.ContinueCyclingParam != null;
var isRecent = App.CurrentRouteType == "Recent Routes" && myMap.RecentRecord != null && myMap.RecentRecord.ContinueCyclingParam != null && !isModal;
transform.Find("BtnContinue").gameObject.SetActive(isRecent);
transform.Find("BtnReride").gameObject.SetActive(isRecent);
transform.Find("MapHBImg").gameObject.SetActive(!isRecent);