| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, October 31, 2017 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class FindPreciousFrameWin : Window |
| | | { |
| | | [SerializeField] FunctionButtonGroup m_FunctionGroup; |
| | | [SerializeField] FunctionButton m_WorldBoss; |
| | | [SerializeField] FunctionButton m_BossHome; |
| | | [SerializeField] FunctionButton m_PersonalBoss; |
| | | [SerializeField] FunctionButton m_ElderGodArea; |
| | | [SerializeField] FunctionButton m_DropRecord; |
| | | |
| | | [SerializeField] Button m_Left; |
| | | [SerializeField] Button m_Right; |
| | | [SerializeField] Button m_Close; |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_WorldBoss.AddListener(ShowWorldBoss); |
| | | m_BossHome.AddListener(ShowBossHome); |
| | | m_PersonalBoss.AddListener(ShowPersonalBoss); |
| | | m_ElderGodArea.AddListener(ShowElderGodArea); |
| | | m_DropRecord.AddListener(ShowDropRecord); |
| | | |
| | | m_Left.AddListener(ShowLastFunction); |
| | | m_Right.AddListener(ShowNextFunction); |
| | | m_Close.AddListener(CloseClick); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | CloseSubWindows(); |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | } |
| | | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | m_Left.gameObject.SetActive(m_FunctionGroup.unLockedCount > 1); |
| | | m_Right.gameObject.SetActive(m_FunctionGroup.unLockedCount > 1); |
| | | |
| | | m_FunctionGroup.TriggerByOrder(functionOrder); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | private void ShowWorldBoss() |
| | | { |
| | | CloseSubWindows(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<WorldBossWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<WorldBossWin>(); |
| | | } |
| | | |
| | | functionOrder = m_WorldBoss.order; |
| | | } |
| | | |
| | | private void ShowBossHome() |
| | | { |
| | | CloseSubWindows(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<BossHomeWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<BossHomeWin>(); |
| | | } |
| | | |
| | | functionOrder = m_BossHome.order; |
| | | } |
| | | |
| | | private void ShowPersonalBoss() |
| | | { |
| | | CloseSubWindows(); |
| | | |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<PersonalBossWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<PersonalBossWin>(); |
| | | } |
| | | |
| | | functionOrder = m_PersonalBoss.order; |
| | | } |
| | | |
| | | private void ShowElderGodArea() |
| | | { |
| | | CloseSubWindows(); |
| | | |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<ElderGodAreaWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<ElderGodAreaWin>(); |
| | | } |
| | | |
| | | functionOrder = m_ElderGodArea.order; |
| | | } |
| | | |
| | | private void ShowDropRecord() |
| | | { |
| | | CloseSubWindows(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<PreciousDropRecordWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<PreciousDropRecordWin>(); |
| | | } |
| | | |
| | | functionOrder = m_DropRecord.order; |
| | | } |
| | | |
| | | private void CloseSubWindows() |
| | | { |
| | | WindowCenter.Instance.CloseImmediately<WorldBossWin>(); |
| | | WindowCenter.Instance.CloseImmediately<BossHomeWin>(); |
| | | WindowCenter.Instance.CloseImmediately<PersonalBossWin>(); |
| | | WindowCenter.Instance.CloseImmediately<ElderGodAreaWin>(); |
| | | WindowCenter.Instance.CloseImmediately<PreciousDropRecordWin>(); |
| | | } |
| | | |
| | | private void ShowLastFunction() |
| | | { |
| | | m_FunctionGroup.TriggerLast(); |
| | | } |
| | | |
| | | private void ShowNextFunction() |
| | | { |
| | | m_FunctionGroup.TriggerNext(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, October 31, 2017
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class FindPreciousFrameWin : Window
|
| | | {
|
| | | [SerializeField] FunctionButtonGroup m_FunctionGroup;
|
| | | [SerializeField] FunctionButton m_WorldBoss;
|
| | | [SerializeField] FunctionButton m_BossHome;
|
| | | [SerializeField] FunctionButton m_PersonalBoss;
|
| | | [SerializeField] FunctionButton m_ElderGodArea;
|
| | | [SerializeField] FunctionButton m_DropRecord;
|
| | |
|
| | | [SerializeField] Button m_Left;
|
| | | [SerializeField] Button m_Right;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_WorldBoss.AddListener(ShowWorldBoss);
|
| | | m_BossHome.AddListener(ShowBossHome);
|
| | | m_PersonalBoss.AddListener(ShowPersonalBoss);
|
| | | m_ElderGodArea.AddListener(ShowElderGodArea);
|
| | | m_DropRecord.AddListener(ShowDropRecord);
|
| | |
|
| | | m_Left.AddListener(ShowLastFunction);
|
| | | m_Right.AddListener(ShowNextFunction);
|
| | | m_Close.AddListener(CloseClick);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | CloseSubWindows();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | m_Left.gameObject.SetActive(m_FunctionGroup.unLockedCount > 1);
|
| | | m_Right.gameObject.SetActive(m_FunctionGroup.unLockedCount > 1);
|
| | |
|
| | | m_FunctionGroup.TriggerByOrder(functionOrder);
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
|
| | | private void ShowWorldBoss()
|
| | | {
|
| | | CloseSubWindows();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<WorldBossWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<WorldBossWin>();
|
| | | }
|
| | |
|
| | | functionOrder = m_WorldBoss.order;
|
| | | }
|
| | |
|
| | | private void ShowBossHome()
|
| | | {
|
| | | CloseSubWindows();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<BossHomeWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<BossHomeWin>();
|
| | | }
|
| | |
|
| | | functionOrder = m_BossHome.order;
|
| | | }
|
| | |
|
| | | private void ShowPersonalBoss()
|
| | | {
|
| | | CloseSubWindows();
|
| | |
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<PersonalBossWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<PersonalBossWin>();
|
| | | }
|
| | |
|
| | | functionOrder = m_PersonalBoss.order;
|
| | | }
|
| | |
|
| | | private void ShowElderGodArea()
|
| | | {
|
| | | CloseSubWindows();
|
| | |
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<ElderGodAreaWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<ElderGodAreaWin>();
|
| | | }
|
| | |
|
| | | functionOrder = m_ElderGodArea.order;
|
| | | }
|
| | |
|
| | | private void ShowDropRecord()
|
| | | {
|
| | | CloseSubWindows();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<PreciousDropRecordWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<PreciousDropRecordWin>();
|
| | | }
|
| | |
|
| | | functionOrder = m_DropRecord.order;
|
| | | }
|
| | |
|
| | | private void CloseSubWindows()
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<WorldBossWin>();
|
| | | WindowCenter.Instance.CloseImmediately<BossHomeWin>();
|
| | | WindowCenter.Instance.CloseImmediately<PersonalBossWin>();
|
| | | WindowCenter.Instance.CloseImmediately<ElderGodAreaWin>();
|
| | | WindowCenter.Instance.CloseImmediately<PreciousDropRecordWin>();
|
| | | }
|
| | |
|
| | | private void ShowLastFunction()
|
| | | {
|
| | | m_FunctionGroup.TriggerLast();
|
| | | }
|
| | |
|
| | | private void ShowNextFunction()
|
| | | {
|
| | | m_FunctionGroup.TriggerNext();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|