| | |
| | | |
| | | protected override void BindController() |
| | | { |
| | | m_OpenServerActivities.Add(100); |
| | | m_OpenServerActivities.Add(0); |
| | | |
| | | } |
| | |
| | | functionOrder = GetDefaultSelect(); |
| | | UpdateFunctionBtns(); |
| | | } |
| | | |
| | | WindowCenter.Instance.Open("ImpactRankWin", true); |
| | | if (functionOrder != 0) |
| | | WindowCenter.Instance.Open<BossFirstBloodWin>(); |
| | | else |
| | | WindowCenter.Instance.Open<ImpactRankWin>(); |
| | | |
| | | var index = alreadyOpenActivitys.IndexOf(functionOrder); |
| | | |
| | |
| | | TimeUtility.OnServerOpenDayRefresh -= OnStepServerDayEvent; |
| | | OpenServerActivityCenter.Instance.openServerActivityStateChange -= OpenServerActivityStateChange; |
| | | impactRankModel.gotoImpactRankType = 0; |
| | | WindowCenter.Instance.Close("ImpactRankWin"); |
| | | CloseOtherWin(); |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | |
| | | |
| | | _cell.redpoint.redpointId = MainRedDot.REDPOINT_OPENRANK * 100 + activityType; |
| | | _cell.SetSelect(_cell.activityType == functionOrder); |
| | | _cell.icon.SetSprite("OpenServerActivty_QMCB"); |
| | | |
| | | if (_cell.activityType == 0) |
| | | _cell.icon.SetSprite("OpenServerActivty_QMCB"); |
| | | else |
| | | _cell.icon.SetSprite("OpenServerActivty_BOSSFK"); |
| | | _cell.downArrow.gameObject.SetActive(false); |
| | | _cell.upArrow.gameObject.SetActive(false); |
| | | |
| | | |
| | | _cell.funcBtn.onClick.RemoveAllListeners(); |
| | | |
| | | _cell.funcBtn.onClick.AddListener(() => |
| | | { |
| | | OnActivityClick(_cell.activityType); |
| | | }); |
| | | |
| | | } |
| | | |
| | | private void CloseOtherWin() |
| | | { |
| | | var children = WindowConfig.GetChildWindows("OpenServerActivityRankWin"); |
| | | foreach (var window in children) |
| | | { |
| | | WindowCenter.Instance.Close(window); |
| | | } |
| | | } |
| | | |
| | | private void OnActivityClick(int _order) |
| | | { |
| | | |
| | | if (functionOrder != _order) |
| | | { |
| | | functionOrder = _order; |
| | | OnOpenActivity(functionOrder); |
| | | } |
| | | |
| | | |
| | | UpdateFunctionBtns(); |
| | | } |
| | | |
| | | private void OnOpenActivity(int _order) |
| | | { |
| | | CloseOtherWin(); |
| | | |
| | | var functionInfos = WindowConfig.GetWindowFunctionInfos("OpenServerActivityRankWin"); |
| | | var index = functionInfos.FindIndex((x) => |
| | | { |
| | | return x.order == _order; |
| | | }); |
| | | |
| | | if (index != -1) |
| | | { |
| | | WindowCenter.Instance.Open(functionInfos[index].window, true); |
| | | } |
| | | } |
| | | |
| | | private void OnStepServerDayEvent() |
| | |
| | | break; |
| | | |
| | | default: |
| | | m_ActivityCtrl.AddCell(ScrollerDataType.Header, activityId); |
| | | break; |
| | | } |
| | | } |
| | |
| | | |
| | | private void OnActivityType(int _index) |
| | | { |
| | | if (!WindowCenter.Instance.IsOpen<ImpactRankWin>()) |
| | | OnActivityClick(0); |
| | | var _order = _index / 100; |
| | | var _type = _index % 100; |
| | | if (impactRankModel.IsLock(_type)) |