增加confirm类型;国家省份城市json;增加列表缓存
This commit is contained in:
1 parent
9bc3864790
commit
60bf5bd59d
19 files changed
+1638
-1360
No files matched your search
@@ -96,7 +96,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
SceneManager.LoadScene("Ride");
|
||||
});
|
||||
transform.Find("Name").GetComponent<Text>().text = myMap.Name;
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("MapTitleImg").GetComponent<RawImage>(), myMap.CoverImage);
|
||||
|
||||
|
||||
transform.Find("Hot").gameObject.SetActive(myMap.IsFire);
|
||||
var props = transform.Find("Props");
|
||||
@@ -115,7 +115,30 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
UIManager.Instance.collectDict[myMap.IsFavorite];
|
||||
transform.Find("BtnInfo").GetComponent<Button>().onClick.AddListener(Info);
|
||||
transform.Find("BtnRide").GetComponent<Button>().onClick.AddListener(Ride);
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("MapHBImg").GetComponent<RawImage>(), myMap.AltitudeGraph);
|
||||
if (App.propTextureCache["mapImgCache"].ContainsKey(myMap.Id))
|
||||
{
|
||||
transform.Find("MapTitleImg").GetComponent<RawImage>().texture =
|
||||
App.propTextureCache["mapImgCache"][myMap.Id];
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("MapTitleImg").GetComponent<RawImage>(), myMap.CoverImage, (t) =>
|
||||
{
|
||||
App.propTextureCache["mapImgCache"].Add(myMap.Id, t);
|
||||
});
|
||||
}
|
||||
if (App.propTextureCache["mapHBCache"].ContainsKey(myMap.Id))
|
||||
{
|
||||
transform.Find("MapHBImg").GetComponent<RawImage>().texture =
|
||||
App.propTextureCache["mapHBCache"][myMap.Id];
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("MapHBImg").GetComponent<RawImage>(), myMap.AltitudeGraph,(t)=>
|
||||
{
|
||||
App.propTextureCache["mapHBCache"].Add(myMap.Id, t);
|
||||
});
|
||||
}
|
||||
SetActive4Button(false);
|
||||
}
|
||||
|
||||
@@ -159,7 +182,10 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
}
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
transform.DOLocalMoveY(localY.Value, 0.3f);
|
||||
if (localY != null)
|
||||
{
|
||||
transform.DOLocalMoveY(localY.Value, 0.3f);
|
||||
}
|
||||
transform.Find("CollectImg").gameObject.SetActive(false);
|
||||
transform.Find("Shadow").gameObject.SetActive(false);
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
|
||||
Reference in new issue
Block a user