| | |
| | | |
| | | [SerializeField] Button changeHeroPosBtn; |
| | | |
| | | [SerializeField] Button autoBtn; |
| | | |
| | | /// <summary> |
| | | /// 初始化组件 |
| | | /// </summary> |
| | |
| | | { |
| | | 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(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | 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(); |
| | | } |