| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | namespace Snxxz.UI
|
| | | { |
| | | //成就活动面板 |
| | | public class AchievementActivityWin : Window |
| | | { |
| | |
| | | [SerializeField] Button _LeftBtn;
|
| | | [SerializeField] Button _RightBtn; |
| | | [SerializeField] FunctionButton m_OpenServiceAchievementBtn;//周狂欢 |
| | | [SerializeField] FunctionButton m_SpringFestival;//春节活动
|
| | | OpenServiceAchievementModel openServiceAchievementModel { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } }
|
| | | SpringFestivalModel springFestivalModel { get { return ModelCenter.Instance.GetModel<SpringFestivalModel>(); } } |
| | | protected override void BindController() |
| | | { |
| | | } |
| | |
| | | _LeftBtn.AddListener(OnClickLeftBtn);
|
| | | _RightBtn.AddListener(OnClickRight); |
| | | m_OpenServiceAchievementBtn.AddListener(OpenServiceAchievementButton); |
| | | m_SpringFestival.AddListener(SpringFestivalButton); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | |
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | } |
| | | functionOrder = 0;
|
| | | |
| | | if (openServiceAchievementModel.IsOpen)
|
| | | {
|
| | | functionOrder = 0;
|
| | | }
|
| | | else if (springFestivalModel.IsOpenFeatures())
|
| | | {
|
| | | functionOrder = 1;
|
| | | }
|
| | |
|
| | |
|
| | | } |
| | | |
| | | protected override void OnActived()
|
| | |
| | | FuncBtnGroup.TriggerByOrder(functionOrder);
|
| | | } |
| | | protected override void OnAfterOpen() |
| | | { |
| | | |
| | | {
|
| | |
|
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | |
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<OpenServiceAchievementWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.IsOpen<SpringFestivalWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<SpringFestivalWin>();
|
| | | }
|
| | | } |
| | | |
| | | private void OpenServiceAchievementButton()
|
| | | {
|
| | | if (!openServiceAchievementModel.IsOpen)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("OutofActivityTime");
|
| | | return;
|
| | | }
|
| | | CloseChild();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | |
| | | }
|
| | | functionOrder = 0;
|
| | | } |
| | | private void SpringFestivalButton()
|
| | | {
|
| | | if (!springFestivalModel.IsOpenFeatures())
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("OutofActivityTime");
|
| | | return;
|
| | | }
|
| | | CloseChild();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<SpringFestivalWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<SpringFestivalWin>(true);
|
| | | }
|
| | | functionOrder = 1;
|
| | |
|
| | | } |
| | | #endregion |
| | |
|
| | | } |