using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class PopAnswerInfo : PopBase { [SerializeField] private Game3DButton CloseBtn; [SerializeField] private TextMesh AnswerText; [SerializeField] private TextMesh DescText; [SerializeField] private int DescLineWords = 21;//每一行显示的字数 public override bool NeedBroad { get { return true; } } protected override void Start() { base.Start(); CloseBtn.onClick.AddListener(OnClick); } //框体类型 public override PopType MType { get { return PopType.Answer; } } private QuestionConfig config; public override void Show(System.Object datas) { base.Show(datas); } protected override void InitView() { base.InitView(); config = GamePlayerData.Instance.eData.mQustionData.GetConfigById(this.CurData.str.Replace("\0", "")); DescText.text = CStaticMethod.FormatParagraph(config.desc, DescLineWords); AnswerText.text = config.answer; } private void OnClick() { if (GamePlayerData.Instance.IsFangzhu()) { this.Hide(); } } private NormalUIData CurData { get { return UICanshu as NormalUIData; } } }