| System/Vip/FairyJadeInvestmentModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Vip/VipInvest/VipInvestModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Vip/VipInvest/VipInvestWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Vip/VipRechargeWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Welfare/WelfareCenter.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Welfare/WelfareWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/Vip/FairyJadeInvestmentModel.cs
@@ -208,8 +208,8 @@ } } private const int Redpoint_key1 = 3502; public Redpoint redPointStre1 = new Redpoint(MainRedDot.RedPoint_VipDot, Redpoint_key1);//仙玉投资红点 private const int Redpoint_key1 = 20110; public Redpoint redPointStre1 = new Redpoint(201, Redpoint_key1);//仙玉投资红点 public int JumpInedx = 0; private void InvestmentRedPoint()//红点 { System/Vip/VipInvest/VipInvestModel.cs
@@ -387,10 +387,22 @@ private List<InvestConfig> configlist; private const int Redpoint_key1 = 3501; public Redpoint redPointStre1 = new Redpoint(MainRedDot.RedPoint_VipDot, Redpoint_key1);//Vip 投资红点 private const int Redpoint_key1_Week1 = 350101; private const int Redpoint_key1_Week2 = 350102; private const int Redpoint_key1_Week3 = 350103; private const int Redpoint_key1_Week4 = 350104; public Redpoint redPointStre1_v1 = new Redpoint(Redpoint_key1, Redpoint_key1_Week1); public Redpoint redPointStre1_v2 = new Redpoint(Redpoint_key1, Redpoint_key1_Week2); public Redpoint redPointStre1_v3 = new Redpoint(Redpoint_key1, Redpoint_key1_Week3); public Redpoint redPointStre1_v4 = new Redpoint(Redpoint_key1, Redpoint_key1_Week4); public int JumpIndex = 0; private void VipInvestRedPoint()//Vip 投资红点 { JumpIndex = 0; redPointStre1_v1.state = RedPointState.None; redPointStre1_v2.state = RedPointState.None; redPointStre1_v3.state = RedPointState.None; redPointStre1_v4.state = RedPointState.None; redPointStre1.state = RedPointState.None; InvestInfo =GetInvestInfoByType((int)InvestType.Vip); cycle = GetInvestCycle(InvestInfo.curDay); @@ -409,7 +421,25 @@ RewardRecordState recordState =GetRecordByIndex((int)InvestType.Vip, config.needDay); if (recordState == RewardRecordState.NoReceive) { redPointStre1.state = RedPointState.Simple; switch (cycle) { case 1: redPointStre1_v1.state = RedPointState.Simple; break; case 2: redPointStre1_v2.state = RedPointState.Simple; break; case 3: redPointStre1_v3.state = RedPointState.Simple; break; case 4: redPointStre1_v4.state = RedPointState.Simple; break; default: break; } // redPointStre1.state = RedPointState.Simple; JumpIndex = i; return; } @@ -430,6 +460,7 @@ } } private void RedPointSate()//Vip投资红点前三天 { if (InvestInfo.investGold > 0) System/Vip/VipInvest/VipInvestWin.cs
@@ -13,6 +13,12 @@ [SerializeField] Button investBtn; [SerializeField] GameObject m_Realized_BGM; [SerializeField] Text m_RemainingDays;//剩余天数 //--------------------------------- [SerializeField] Transform m_ButtonGroup;//按钮组 [SerializeField] Button m_Button_one; [SerializeField] Button m_Button_Two; [SerializeField] Button m_Button_Three; [SerializeField] Button m_Button_Four; VipInvestModel _investModel; VipInvestModel investModel { get { return _investModel ?? (_investModel = ModelCenter.Instance.GetModel<VipInvestModel>()); } } ItemTipsModel _tipsModel; @@ -31,7 +37,10 @@ } protected override void AddListeners() { m_Button_one.AddListener(OnclickButtonOne); m_Button_Two.AddListener(OnClickButtonTwo); m_Button_Three.AddListener(OnClickButtonThree); m_Button_Four.AddListener(OnClickButtonFour); } protected override void OnPreOpen() @@ -42,11 +51,11 @@ investIndex = investModel.GetVipInvestIndex(); if (InvestInfo.curDay <= 0) { { m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, 0.ToString(), true)); } else { { m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, (28 - InvestInfo.curDay).ToString(), true)); } @@ -61,8 +70,9 @@ m_Realized_BGM.SetActive(true); investBtn.gameObject.SetActive(false); } configlist = investModel.GetInvestConfiglistByCycle(cycle); CreateRewardCell(); SwithWeek(cycle); //configlist = investModel.GetInvestConfiglistByCycle(cycle); //CreateRewardCell(); investModel.RefreshInvestAct += RefreshInvestState; } @@ -107,11 +117,11 @@ investBtn.gameObject.SetActive(false); } if (InvestInfo.curDay <= 0) { { m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, 0.ToString(), true)); } else { { m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, (28 - InvestInfo.curDay).ToString(), true)); } } @@ -135,7 +145,16 @@ } ctrl.Restart(); } ctrl.JumpIndex(investModel.JumpIndex); int a_Week= investModel.GetInvestCycle(InvestInfo.curDay); if (a_Week == cycle) { ctrl.JumpIndex(investModel.JumpIndex); } else { ctrl.JumpIndex(0); } } private void RefreshRewardCell(ScrollerDataType type, CellView cell) @@ -149,7 +168,7 @@ GameObject IsMissImage = cell.transform.Find("IsMissImage").gameObject;//已错过 GameObject IsReachImage = cell.transform.Find("IsReachImage").gameObject;//未达成 int day = cell.index + 1; int day = cell.index + 1; titleText.text = string.Format(Language.Get("VipInvestmentHint"), cycle, day); InvestConfig config = configlist[cell.index]; @@ -275,5 +294,89 @@ } private void CloseAllSelected() { for (int i = 0; i < m_ButtonGroup.childCount; i++) { var selected = m_ButtonGroup.GetChild(i).transform.Find("Selected").gameObject; if (selected.activeSelf) { selected.SetActive(false); } } } private void OnclickButtonOne() { CloseAllSelected(); var selected = m_Button_one.transform.Find("Selected").gameObject; if (!selected.activeSelf) { selected.SetActive(true); } cycle = 1; configlist = investModel.GetInvestConfiglistByCycle(cycle); CreateRewardCell(); } private void OnClickButtonTwo() { CloseAllSelected(); var selected = m_Button_Two.transform.Find("Selected").gameObject; if (!selected.activeSelf) { selected.SetActive(true); } cycle = 2; configlist = investModel.GetInvestConfiglistByCycle(cycle); CreateRewardCell(); } private void OnClickButtonThree() { CloseAllSelected(); var selected = m_Button_Three.transform.Find("Selected").gameObject; if (!selected.activeSelf) { selected.SetActive(true); } cycle = 3; configlist = investModel.GetInvestConfiglistByCycle(cycle); CreateRewardCell(); } private void OnClickButtonFour() { CloseAllSelected(); var selected = m_Button_Four.transform.Find("Selected").gameObject; if (!selected.activeSelf) { selected.SetActive(true); } cycle = 4; configlist = investModel.GetInvestConfiglistByCycle(cycle); CreateRewardCell(); } private void SwithWeek(int cycle_int) { switch (cycle_int) { case 1: OnclickButtonOne(); break; case 2: OnClickButtonTwo(); break; case 3: OnClickButtonThree(); break; case 4: OnClickButtonFour(); break; default: break; } } } } System/Vip/VipRechargeWin.cs
@@ -18,11 +18,9 @@ [SerializeField] Button rightBtn; [SerializeField] Button closeBtn; [SerializeField] FunctionButton vipPayTitleBtn; [SerializeField] FunctionButton vipMonthInvestTitleBtn; [SerializeField] FunctionButton vipTitleBtn; [SerializeField] FunctionButton vipInvestTitleBtn; [SerializeField] FunctionButtonGroup buttonGroup; [SerializeField] GameObject m_EndImage4; private VipModel m_Model; private VipModel model @@ -50,7 +48,6 @@ rightBtn.onClick.AddListener(buttonGroup.TriggerNext); closeBtn.onClick.AddListener(OnClose); vipPayTitleBtn.onClick.AddListener(OnVipPay); vipMonthInvestTitleBtn.onClick.AddListener(OnMonthInvest); vipTitleBtn.onClick.AddListener(OnVip); vipInvestTitleBtn.onClick.AddListener(OnVipInvest); } @@ -100,50 +97,8 @@ functionOrder = 2; } private void OnMonthInvest() { CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<FairyJadeInvestmentWin>(); } else { WindowCenter.Instance.Open<FairyJadeInvestmentWin>(); } presentWinType = VipModel.VipWinType.MonthInvest; functionOrder = 3; } protected override void OnPreOpen() { bool isOpen = false; if (fairyJadeInvestmentModel.InvestmentGrade > 0 && fairyJadeInvestmentModel.InvestmentGrade < 3) { isOpen = true; } else { if (fairyJadeInvestmentModel.InvestmentGrade == 3) { foreach (int key in fairyJadeInvestmentModel.InfoSeriors.Keys) { if (fairyJadeInvestmentModel.InfoSeriors[key] == 0) { isOpen = true; } } } } if (PlayerDatas.Instance.baseData.LV >= 300 && !isOpen) { m_EndImage4.SetActive(false); vipMonthInvestTitleBtn.gameObject.SetActive(false); } else { m_EndImage4.SetActive(true); vipMonthInvestTitleBtn.gameObject.SetActive(true); } CloseChildWin(); model.OnVipOpenPayWinEvent += OnVipWinOpenEvnet; RechargeTipWin.JumpVipPanel += JumpVipPanel; @@ -198,10 +153,6 @@ { WindowCenter.Instance.CloseImmediately<VipInvestWin>(); } if (WindowCenter.Instance.CheckOpen<FairyJadeInvestmentWin>()) { WindowCenter.Instance.CloseImmediately<FairyJadeInvestmentWin>(); } if (WindowCenter.Instance.CheckOpen<RechargeWin>()) { WindowCenter.Instance.CloseImmediately<RechargeWin>(); @@ -227,10 +178,6 @@ case VipModel.VipWinType.VipInverst: vipInvestTitleBtn.state = TitleBtnState.Click; OnVipInvest(); break; case VipModel.VipWinType.MonthInvest: vipMonthInvestTitleBtn.state = TitleBtnState.Click; OnMonthInvest(); break; } } System/Welfare/WelfareCenter.cs
@@ -15,6 +15,8 @@ BossRebornModel bossRebornModel { get { return ModelCenter.Instance.GetModel<BossRebornModel>(); } } FairyJadeInvestmentModel m_FairyJadeInvestmentModel; FairyJadeInvestmentModel fairyJadeInvestmentModel { get { return m_FairyJadeInvestmentModel ?? (m_FairyJadeInvestmentModel = ModelCenter.Instance.GetModel<FairyJadeInvestmentModel>()); } } /// <summary> /// 点击主界面福利按钮打开 /// </summary> @@ -69,7 +71,12 @@ WindowCenter.Instance.Open<WelfareWin>(false, 7); return; } if (fairyJadeInvestmentModel.redPointStre1.state == RedPointState.Simple) { WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<WelfareWin>(false, 8); return; } WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<WelfareWin>(false, functionOrder); } @@ -115,7 +122,10 @@ { return 7; } if (fairyJadeInvestmentModel.redPointStre1.state == RedPointState.Simple) { return 8; } return functionOrder; } } System/Welfare/WelfareWin.cs
@@ -21,6 +21,7 @@ [SerializeField] FunctionButton m_ExchangeBtn; [SerializeField] FunctionButton m_BossReornBtn; [SerializeField] FunctionButton m_NpracticeBtn; [SerializeField] FunctionButton m_FairyJadeInvestment; [SerializeField] FunctionButtonGroup buttonGroup; [SerializeField] Button closeBtn; @@ -31,7 +32,8 @@ InSevenDayModel inSevenDay { get { return m_InSevenDayModel ?? (m_InSevenDayModel = ModelCenter.Instance.GetModel<InSevenDayModel>()); } } BossRebornModel bossRebornModel { get { return ModelCenter.Instance.GetModel<BossRebornModel>(); } } FairyJadeInvestmentModel m_FairyJadeInvestmentModel; FairyJadeInvestmentModel fairyJadeInvestmentModel { get { return m_FairyJadeInvestmentModel ?? (m_FairyJadeInvestmentModel = ModelCenter.Instance.GetModel<FairyJadeInvestmentModel>()); } } #region Built-in protected override void BindController() { @@ -47,6 +49,7 @@ m_NpracticeBtn.AddListener(OnNPractice); closeBtn.onClick.AddListener(CloseClick); m_BossReornBtn.AddListener(BossRebornBtn); m_FairyJadeInvestment.AddListener(FairyJade); } private void OnPrayer() @@ -106,6 +109,20 @@ functionOrder = 7; } private void FairyJade() { CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<FairyJadeInvestmentWin>(); } else { WindowCenter.Instance.Open<FairyJadeInvestmentWin>(); } functionOrder = 8; } private void OnExchange() { CloseChildWin(); @@ -161,6 +178,34 @@ else { Btn_InSeven.gameObject.SetActive(true); } bool isOpen = false; if (fairyJadeInvestmentModel.InvestmentGrade > 0 && fairyJadeInvestmentModel.InvestmentGrade < 3) { isOpen = true; } else { if (fairyJadeInvestmentModel.InvestmentGrade == 3) { foreach (int key in fairyJadeInvestmentModel.InfoSeriors.Keys) { if (fairyJadeInvestmentModel.InfoSeriors[key] == 0) { isOpen = true; } } } } if (PlayerDatas.Instance.baseData.LV >= 300 && !isOpen) { m_FairyJadeInvestment.gameObject.SetActive(false); } else { m_FairyJadeInvestment.gameObject.SetActive(true); } CheckOperationOpen(); @@ -224,6 +269,10 @@ { WindowCenter.Instance.CloseImmediately<NPracticePointWin>(); } if (WindowCenter.Instance.CheckOpen<FairyJadeInvestmentWin>()) { WindowCenter.Instance.CloseImmediately<FairyJadeInvestmentWin>(); } WindowCenter.Instance.CloseImmediately<BossRebornWin>(); }