using CG.Framework; using CG.UTility; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /******************************************************************************* *Create By CG *Function 操作界面顶部UI *******************************************************************************/ namespace ZXK.GYJQR { public class OperationTopPanel : UIBase { private Text _subjectNameTxt = null; //private Button _pdfLoadBtn = null; private Text _studentNameTxt = null; private Text _studentNumTxt = null; private Text _studentTotalTxt = null; private Text _studentActualTxt = null; private Transform _scoreItemContent = null; private GameObject _scoreItemPrefab = null; private Image _oprationImg = null; protected override void Awake() { base.Awake(); //首次进入训练页提示 if (!GameManager.Instance._EnteredTrainSceneArray.Contains(GameManager.Instance._CurSystemType)) { GameManager.Instance._EnteredTrainSceneArray.Add(GameManager.Instance._CurSystemType); UI_Manage.Instance.ShowPanel("FirstEnterTrainPanel", System.Type.GetType("ZXK.GYJQR.FirstEnterTrainPanel"), UIGroup.Tip); } } private void Start() { _subjectNameTxt = GetWedage("SubjectNameText_N").GetComponent(); _studentNameTxt = GetWedage("NameTxt_N").GetComponent(); _studentNumTxt = GetWedage("NumberTxt_N").GetComponent(); _studentTotalTxt = GetWedage("TotalScoreTxt_N").GetComponent(); _studentActualTxt = GetWedage("ActualScoreTxt_N").GetComponent(); _oprationImg = GetWedage("OprationImg_N").GetComponent(); _scoreItemContent = GetWedage("ScoreItemContent_N").transform; _scoreItemPrefab = GetWedage("ScoreItemPrefab_N"); GameObject AZBSExplain = GetWedage("ExplainContain_N").transform.Find("BG/AZBSTrainExplainTxt").gameObject; GameObject BJCJExplain = GetWedage("ExplainContain_N").transform.Find("BG/BJCJTrainExplainTxt").gameObject; if (GameManager.Instance._CurSystemType == EnumCtrl.SystemType.AZBS) { _oprationImg.sprite = Resources.Load(ConstCtrl.OPRATION1_IMG_PATH); AZBSExplain.SetActive(true); BJCJExplain.SetActive(false); } else if (GameManager.Instance._CurSystemType == EnumCtrl.SystemType.BJCZ) { _oprationImg.sprite = Resources.Load(ConstCtrl.OPRATION2_IMG_PATH); AZBSExplain.SetActive(false); BJCJExplain.SetActive(true); } _subjectNameTxt.text = EnumCtrl.GetEnumDescription(GameManager.Instance._CurSystemType); _studentNameTxt.text = GameManager.Instance._StudentName; _studentNumTxt.text = GameManager.Instance._StudentNumber; GetWedage("ScoreContain_N").transform.Find("BG/CloseBtn").GetComponent