From 9e89e605d5429babb4b33df2e47ea86dff9d2ba7 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 20 十一月 2025 11:55:04 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/Main/AutoFightWin.cs | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/Main/System/Main/AutoFightWin.cs b/Main/System/Main/AutoFightWin.cs
index ab08e19..4971fbf 100644
--- a/Main/System/Main/AutoFightWin.cs
+++ b/Main/System/Main/AutoFightWin.cs
@@ -1,3 +1,4 @@
+using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -38,12 +39,14 @@
isOpenCostScroll = !isOpenCostScroll;
costScroll.SetActive(isOpenCostScroll);
costArrow.transform.localRotation = Quaternion.Euler(0, 0, isOpenCostScroll ? 180 : 0);
+ AutoFightModel.Instance.ClickCostRed();
});
changeSpeedBtn.AddListener(() =>
{
isOpenSpeedScroll = !isOpenSpeedScroll;
speedScroll.SetActive(isOpenSpeedScroll);
speedArrow.transform.localRotation = Quaternion.Euler(0, 0, isOpenSpeedScroll ? 180 : 0);
+ AutoFightModel.Instance.ClickSpeedRed();
});
betterEquipToggle.AddListener((bool value) =>
@@ -115,6 +118,10 @@
costScroll.AddCell(ScrollerDataType.Header, i + 1);
}
costScroll.Restart();
+ if (BlessLVManager.Instance.m_TreeLV >= AutoFightModel.Instance.autoCostWithBlessLV[Math.Min(AutoFightModel.Instance.autoCostWithBlessLV.Length - 1, 2)])
+ {
+ costScroll.JumpIndex(2);
+ }
}
void CreateSpeedScroll()
@@ -166,19 +173,14 @@
{
var btn = cell.GetComponent<Button>();
var needtaskCount = TaskManager.Instance.GetNeedFinishTaskCount(AutoFightModel.Instance.speed2UnlockMissionID);
- RechargeCount _rechargeCount;
- bool isbuy = false;
- if (RechargeManager.Instance.TryGetRechargeCount(AutoFightModel.Instance.speed3UnlockCTGID, out _rechargeCount))
- {
- isbuy = _rechargeCount.totalCount > 0;
- }
-
+ bool isbuy = InvestModel.Instance.IsActiveFightSpeed(3);
+ bool isActiveSpeed2 = needtaskCount <= 0 || isbuy;
btn.AddListener(() =>
{
if (cell.index == 2)
{
- if (needtaskCount > 0)
+ if (!isActiveSpeed2)
{
SysNotifyMgr.Instance.ShowTip("autofight2", needtaskCount);
return;
@@ -201,7 +203,7 @@
var cntText = cell.GetComponentInChildren<Text>();
if (cell.index == 2)
{
- cntText.text = UIHelper.AppendColor(needtaskCount > 0 ? TextColType.Gray : TextColType.LightWhite, cell.index.ToString());
+ cntText.text = UIHelper.AppendColor(!isActiveSpeed2 ? TextColType.Gray : TextColType.LightWhite, cell.index.ToString());
}
else if (cell.index == 3)
{
--
Gitblit v1.8.0