using Assets.Scripts; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; namespace Assets.Scenes.Ride.Scripts { public class TopRankingItem : MonoBehaviour { private RawImage Head; private RawImage Country; private Image Background; private Text Name; private Text Speed; private Text Distance; private Text Ratio;//功体比 private Text Rank;//当前排名 private Text Timer; private int _userId = 0; public int UserId { get { return _userId; } } private string _headUrl = string.Empty; private string _countryUrl = string.Empty; private string _name = string.Empty; private string _speed = string.Empty; private string _distance = string.Empty; private string _ratio = string.Empty; public int rank { get; set; } private Texture countryTexture; CyclingController cyclingController; private void Awake() { cyclingController = FindObjectOfType(); Background = transform.GetComponent(); Head = transform.Find("Head").GetComponent(); Country = transform.Find("Country").GetComponent(); Name = transform.Find("Name").GetComponent(); Speed = transform.Find("Speed").GetComponent(); Distance = transform.Find("Distance").GetComponent(); Ratio = transform.Find("Ratio").GetComponent(); Rank = transform.Find("Rank").GetComponent(); Timer = transform.Find("Timer")?.GetComponent(); countryTexture = Resources.Load("Images/flag_China_Person").texture; var btn = this.gameObject.GetComponent