yyl
4 天以前 9e89e605d5429babb4b33df2e47ea86dff9d2ba7
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)
        {