using System; using System.Collections; using UnityEngine; public class SpinBox : MonoBehaviour { private void Start() { SpinBoxButton component = base.transform.Find("Up").GetComponent(); SpinBoxButton component2 = base.transform.Find("Down").GetComponent(); UILabel component3 = base.transform.Find("Box").GetComponent(); UILabel component4 = GameObject.Find("ProfilePanel/CharacterInfo/ProfileBase/StatusPoints/MaidPoint").GetComponent(); this.amountPerPoint = 20; SpinBoxParam spinBoxParam = this.InitParam(); component.Init(spinBoxParam, component3, component4); component2.Init(spinBoxParam, component3, component4); this.SetEnableButton(); } private SpinBoxParam InitParam() { return new SpinBoxParam { m_maxNumber = this.maxNumber, m_minNumber = this.minNumber, amountPerPoint = this.amountPerPoint }; } private void SetEnableButton() { bool enabledInput = BaseMgr.Instance.m_enabledInput; IEnumerator enumerator = base.transform.GetEnumerator(); try { while (enumerator.MoveNext()) { object obj = enumerator.Current; Transform transform = (Transform)obj; if (transform.name == "Up" || transform.name == "Down") { transform.gameObject.SetActive(enabledInput); } } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } } [SerializeField] private int maxNumber = 9999; [SerializeField] private int minNumber; [SerializeField] private int amountPerPoint; private const string POINT_PATH = "ProfilePanel/CharacterInfo/ProfileBase/StatusPoints/MaidPoint"; }