| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | |
| | | |
| | | [SerializeField] FunctionButtonGroup m_FunctionGroup; |
| | | [SerializeField] FunctionButton m_DemonJar; |
| | | [SerializeField] FunctionButton m_FairyGrabBoss; |
| | | |
| | | [SerializeField] Button m_Left; |
| | | [SerializeField] Button m_Right; |
| | | [SerializeField] Button m_Close; |
| | | |
| | | FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } } |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | |
| | | protected override void AddListeners() |
| | | { |
| | | m_DemonJar.AddListener(ShowDemonJar); |
| | | m_FairyGrabBoss.AddListener(FairyGrabBoss); |
| | | |
| | | m_Left.AddListener(ShowLastFunction); |
| | | m_Right.AddListener(ShowNextFunction); |
| | | m_Close.AddListener(CloseClick); |
| | | } |
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreOpen() |
| | | { |
| | | |
| | | fairyGrabBossModel.stateUpdate += FairyGrabBossUpdate; |
| | | m_FairyGrabBoss.state = fairyGrabBossModel.IsOpen ? TitleBtnState.Normal : TitleBtnState.Locked; |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | {
|
| | | fairyGrabBossModel.stateUpdate -= FairyGrabBossUpdate; |
| | | |
| | | CloseSubWindows(); |
| | | if (!WindowJumpMgr.Instance.IsJumpState) |
| | | { |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | |
| | |
| | | functionOrder = m_DemonJar.order; |
| | | } |
| | | |
| | | private void FairyGrabBoss()
|
| | | {
|
| | | CloseSubWindows(); |
| | | WindowCenter.Instance.Open<FairyGrabBossWin>(); |
| | | functionOrder = m_FairyGrabBoss.order;
|
| | | } |
| | | |
| | | private void FairyGrabBossUpdate()
|
| | | {
|
| | | m_FairyGrabBoss.state = fairyGrabBossModel.IsOpen ? TitleBtnState.Normal : TitleBtnState.Locked; |
| | | } |
| | | |
| | | private void CloseSubWindows() |
| | | { |
| | | WindowCenter.Instance.CloseImmediately<DemonJarWin>(); |
| | | WindowCenter.Instance.CloseImmediately<FairyGrabBossWin>(); |
| | | } |
| | | |
| | | private void ShowLastFunction() |