graph chart引入&骑行结果弹窗
This commit is contained in:
1 parent
40d118cea3
commit
96f3644b5b
2374 files changed
+485161
-2410
No files matched your search
@@ -0,0 +1,51 @@
|
||||
using Assets.Scripts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
public class RankingItemScript:MonoBehaviour
|
||||
{
|
||||
Text rankingText;
|
||||
Text nameText;
|
||||
Text timerText;
|
||||
|
||||
RawImage head;
|
||||
RawImage country;
|
||||
private void Awake()
|
||||
{
|
||||
rankingText = transform.Find("Ranking").GetComponent<Text>();
|
||||
nameText = transform.Find("Name").GetComponent<Text>();
|
||||
timerText = transform.Find("Timer").GetComponent<Text>();
|
||||
|
||||
head = transform.Find("Head").GetComponent<RawImage>();
|
||||
country = transform.Find("Country").GetComponent<RawImage>();
|
||||
}
|
||||
|
||||
public void SetRanking(string ranking)
|
||||
{
|
||||
rankingText.text = ranking.PadLeft(2,'0');
|
||||
}
|
||||
public void SetName(string name)
|
||||
{
|
||||
nameText.text = name;
|
||||
}
|
||||
public void SetTimer(string timer)
|
||||
{
|
||||
timerText.text = timer;
|
||||
}
|
||||
public void SetHead(string url)
|
||||
{
|
||||
Utils.DisplayImage(StartCoroutine, head, url);
|
||||
}
|
||||
public void SetCountry(Texture texture)
|
||||
{
|
||||
country.texture = texture;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user