路线产生逻辑微调

This commit is contained in:
lishuo committed 2021-04-15 17:09:35 +08:00
1 parent 62938ec6ae
commit 92e43c2cd8
21 files changed
+3375 -1829

No files matched your search

@@ -28,7 +28,7 @@ namespace Assets.Scenes.Ride.Scripts
private string _speed = string.Empty;
private string _distance = string.Empty;
private string _ratio = string.Empty;
private Texture countryTexture;
private void Awake()
{
Head = transform.Find("Head").GetComponent<RawImage>();
@@ -37,6 +37,7 @@ namespace Assets.Scenes.Ride.Scripts
Speed = transform.Find("Speed").GetComponent<Text>();
Distance = transform.Find("Distance").GetComponent<Text>();
Ratio = transform.Find("Ratio").GetComponent<Text>();
countryTexture = Resources.Load<Sprite>("Images/flag_China_Person").texture;
}
public void setRatio(string ratio)
@@ -51,7 +52,9 @@ namespace Assets.Scenes.Ride.Scripts
{
if (!_headUrl.Equals(url))
{
StartCoroutine(DownloadImage(Head, url));
Head.texture = App.CurrentUserHeadTexture;
//Utils.DisplayImage(StartCoroutine, Head, url);
//StartCoroutine(DownloadImage(Head, url));
var rect = ((RectTransform)Head.transform).rect;
Material material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height, 0));
@@ -82,7 +85,9 @@ namespace Assets.Scenes.Ride.Scripts
{
if (!_countryUrl.Equals(url))
{
StartCoroutine(DownloadImage(Country, url));
Country.texture = countryTexture;
//Utils.DisplayImage(StartCoroutine, Country, url);
//StartCoroutine(DownloadImage(Country, url));
var rect = ((RectTransform)Country.transform).rect;
Material material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height, 0));