123456789101112131415161718192021222324252627282930313233343536 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class UISpoitsPanel : UIPanelBase
- {
- private Transform m_ContentName;
- private GameObject m_SpoitPrefab;
- private Toggle m_SpoitBtn;
- protected override void OnAwake()
- {
- base.OnAwake();
- m_ContentName = CacheTransform.Find("Scroll View (2)/Viewport/UISpoitContent");
- m_SpoitPrefab = CacheTransform.Find("Scroll View (2)/Viewport/UISpoitContent/SpoitBtn").gameObject;
- m_SpoitBtn = CacheTransform.Find("Scroll View (2)/Viewport/UISpoitContent/SpoitBtn").GetComponent<Toggle>();
- }
- protected override void OnShow(object param)
- {
- base.OnShow(param);
- }
- public override void Hide()
- {
- base.Hide();
- }
- public void SetSpoit(string SpoitName, bool state)
- {
- m_SpoitBtn.transform.Find("Text").GetComponent<Text>().text = SpoitName;
- m_SpoitBtn.gameObject.SetActive(state);
- }
- }
|