using System.Collections; using System.Collections.Generic; using UnityEngine; public class PopUpdate : PopBase { [SerializeField] private Game3DButton OkBtn; [SerializeField] private TextMesh MText; [SerializeField] private TextMesh DescText;//更新描述 private string str_format = "有新版本 {0} 可以使用 \n点击确定开始更新"; protected override void Start() { OkBtn.onClick.AddListener(OnClick); } //框体类型 public override PopType MType { get { return PopType.Msg; } } public override void Show(System.Object data) { UpdataData mUpdataData = (UpdataData)data; if(mUpdataData.debug) { this.MText.text = string.Format(str_format, mUpdataData.debug_ver); this.DescText.text = mUpdataData.debug_desc; } else { this.MText.text = string.Format(str_format, mUpdataData.online_ver); this.DescText.text = mUpdataData.desc; } base.Show(); } private void OnClick() { this.Hide(); MessageCenterController.Instance.Broadcast(GameEnum.MESSAGE_UPDATE_START); } }