using Assets.Scripts; using Assets.Scripts.Apis.Models; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class RaceModalScript : RaceScript { // Start is called before the first frame update void Start() { UIManager.AddEvent(transform.Find("Container/Exit").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => { //停止计时器 UIManager.CloseModal(); transform.GetComponent().SetCurrentItem(null); }); } // Update is called once per frame void Update() { } public void Initial(MapCompetition mapCompetition) { var item = transform.Find("Container/Main/ItemSmall-Mobile"); item.GetComponent().Initial(mapCompetition, transform,"modal"); //开始计时器 transform.GetComponent().SetCurrentItem(item); Utils.DisplayImage(transform.Find("Container/Main/Left").GetComponent(), mapCompetition.RouteCover, true); } }