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 => { //停止计时器 gameObject.SetActive(false); transform.GetComponent().SetCurrentItem(null); _parent.GetComponent().Refresh(); }); } // Update is called once per frame void Update() { } public override void Show() { base.Show(); } Transform _parent; public void Initial(Transform parent, MapCompetition mapCompetition) { _parent = parent; 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); } }