hch
2025-08-15 7bd85eb8d0b9664f4645534b42c82ab0f32754d3
Main/System/Main/HomeWin.cs
@@ -27,6 +27,8 @@
    [SerializeField] Button changeHeroPosBtn;
    [SerializeField] Button autoBtn;
    /// <summary>
    /// 初始化组件
    /// </summary>
@@ -37,11 +39,34 @@
        {
            UIManager.Instance.OpenWindow<MainBossEnterWin>();
        });
        changeHeroPosBtn.AddListener(() =>
        {
            HeroUIManager.Instance.selectTeamType = TeamType.Story;
            UIManager.Instance.OpenWindow<HeroPosWin>();
        });
        autoBtn.AddListener(()=>
        {
            //测试拾取所有物品
            var items = PackManager.Instance.GetItems(PackType.DropItem);
            List<int> dropindexs = new List<int>();
            for (int i = 0; i < items.Count; i++)
            {
                var item = items[i];
                if (dropindexs.Count > 5)
                {
                    EquipModel.Instance.NotifyItemDrop(dropindexs, BattleManager.Instance.storyBattleField.battleRootNode.blueTeamNodeList[Random.Range(0, 5)].GetComponent<RectTransform>());
                    dropindexs.Clear();
                }
                dropindexs.Add(item.gridIndex);
            }
            if (dropindexs.Count > 0)
            {
                EquipModel.Instance.NotifyItemDrop(dropindexs, BattleManager.Instance.storyBattleField.battleRootNode.blueTeamNodeList[Random.Range(0,5)].GetComponent<RectTransform>());
                dropindexs.Clear();
            }
        });
    }
@@ -126,7 +151,14 @@
            taskText.text = taskConfig.TaskDescribe;
            taskNumText.text = string.Format("({0}/{1})", task.CurValue, taskConfig.NeedValue);
            taskNumText.color = task.CurValue >= taskConfig.NeedValue ? UIHelper.GetUIColor(TextColType.NavyYellow) :  UIHelper.GetUIColor(TextColType.Red);
            taskEffect.SetActive(TaskManager.Instance.GetMainTaskState() == 2);
            if (TaskManager.Instance.GetMainTaskState() == 2)
            {
                taskEffect.Play();
            }
            else
            {
                taskEffect.Stop();
            }
            awardIcon.SetOrgSprite(ItemConfig.Get(taskConfig.AwardItemList[0][0]).IconKey);
            awardCnt.text = taskConfig.AwardItemList[0][1].ToString();
        }