| | |
| | | /// </summary> |
| | | public class MainWin : UIBase |
| | | { |
| | | private GameObject windowBackground; |
| | | public GameObject windowBackground; |
| | | |
| | | // 底部按钮组 |
| | | private Button[] bottomTabButtons; |
| | | public Button[] bottomTabButtons; |
| | | |
| | | private GameObject[] bottomTabEffects; |
| | | |
| | |
| | | protected override void InitComponent() |
| | | { |
| | | base.InitComponent(); |
| | | |
| | | windowBackground = _rectTransform.Find("RawImgBackground").gameObject; |
| | | |
| | | bottomTabButtons = new Button[5]; |
| | | for (int i = 1; i <= 5; i++) |
| | | { |
| | | string buttonName = "Buttons/Button" + i; |
| | | bottomTabButtons[i-1] = _rectTransform.Find(buttonName).GetComponent<Button>(); |
| | | #if UNITY_EDITOR |
| | | //测试代码 |
| | | #endif |
| | | } |
| | | |
| | | // 初始化UI组件事件 |
| | | InitButtonEvents(); |