| | |
| | | [SerializeField] Transform caseesObj; |
| | | FuncPresetChooseCells presetChooseCells; |
| | | |
| | | Action presetChooseCellssetOnLoaded; |
| | | |
| | | [SerializeField] Button funPresetBtn; |
| | | |
| | | |
| | | Sequence sequence; |
| | | CancellationTokenSource _cts; |
| | | Queue<int> showConnectTipQueue = new Queue<int>(); |
| | |
| | | countryOnBtn.AddListener(() => |
| | | { |
| | | HeroUIManager.Instance.isCustonHeroFormation = false; |
| | | UIManager.Instance.OpenWindow<HeroFormationWin>(); |
| | | UIManager.Instance.OpenWindowAsync<HeroFormationWin>().Forget(); |
| | | }); |
| | | |
| | | lineupRecommendBtn.AddListener(() => |
| | | { |
| | | UIManager.Instance.OpenWindow<LineupRecommendWin>(); |
| | | UIManager.Instance.OpenWindowAsync<LineupRecommendWin>().Forget(); |
| | | }); |
| | | |
| | | m_IsToggleOn = LocalSave.GetBool("ShowConn" + PlayerDatas.Instance.baseData.PlayerID, false); |
| | | fiterManager = HeroSelectBehaviour.Create(heroSelectBehaviour); |
| | | |
| | | var presetObj = UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells"); |
| | | presetObj.transform.SetParentEx(caseesObj, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | presetChooseCells = presetObj.GetComponent<FuncPresetChooseCells>(); |
| | | presetChooseCells.ChangeAlignment(TextAnchor.MiddleCenter); |
| | | |
| | | UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells").ContinueWith(presetObj => |
| | | { |
| | | if (this == null) |
| | | { |
| | | if (presetObj != null) |
| | | { |
| | | GameObject.DestroyImmediate(presetObj); |
| | | } |
| | | return; |
| | | } |
| | | presetObj.transform.SetParentEx(caseesObj, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | presetChooseCells = presetObj.GetComponent<FuncPresetChooseCells>(); |
| | | presetChooseCells.ChangeAlignment(TextAnchor.MiddleCenter); |
| | | presetChooseCellssetOnLoaded?.Invoke(); |
| | | presetChooseCellssetOnLoaded = null; |
| | | }).Forget(); |
| | | |
| | | |
| | | funPresetBtn.AddListener(()=> |
| | | { |
| | | FuncPresetManager.Instance.ClickBattlePreset((int)BattlePreSetType.Story); |
| | | }); |
| | | } |
| | | |
| | | |
| | |
| | | RefreshEmptyTip(); |
| | | |
| | | showConnTipToggleBtn.isOn = isToggleOn; |
| | | fiterManager.Display(0, SelectJobCountry); |
| | | if (null != fiterManager) |
| | | { |
| | | fiterManager.Display(0, SelectJobCountry); |
| | | } |
| | | else |
| | | { |
| | | HeroSelectBehaviour.Create(heroSelectBehaviour).ContinueWith(fmgr => |
| | | { |
| | | if (this == null) |
| | | { |
| | | if (fmgr != null) |
| | | { |
| | | GameObject.DestroyImmediate(fmgr.gameObject); |
| | | } |
| | | return; |
| | | } |
| | | fiterManager = fmgr; |
| | | fiterManager.Display(0, SelectJobCountry); |
| | | }).Forget(); |
| | | } |
| | | fightPowerText.text = UIHelper.ReplaceLargeArtNum(FightPowerManager.Instance.GetTeamFightPower(HeroUIManager.Instance.selectTeamType, true)); |
| | | |
| | | presetChooseCells.Display((int)BattlePreSetType.Story, (int)FuncPresetType.Team); |
| | | if (null == presetChooseCells) |
| | | { |
| | | presetChooseCellssetOnLoaded = () => |
| | | { |
| | | if (this == null) |
| | | return; |
| | | presetChooseCells.Display((int)BattlePreSetType.Story, (int)FuncPresetType.Team); |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | presetChooseCells.Display((int)BattlePreSetType.Story, (int)FuncPresetType.Team); |
| | | } |
| | | |
| | | |
| | | funPresetBtn.SetActive(FuncPresetManager.Instance.IsPreShow()); |
| | | } |
| | | |
| | | void RefreshFlyHead() |
| | |
| | | |
| | | |
| | | flyAlphaTween.alpha = 1; |
| | | flyHead.Init(flyHero.heroId, flyHero.SkinID); |
| | | flyHead.Init(flyHero.heroId, flyHero.SkinID).Forget(); |
| | | flyHead.transform.position = startPos; |
| | | var targetPos = scenePosImgs[posList[0]].transform.position; |
| | | flyHead.transform.localScale = Vector3.one; |
| | |
| | | while (showConnectTipQueue.Count > 0) |
| | | { |
| | | await UniTask.Delay(300, cancellationToken: token); |
| | | if (this == null) return; // destroyed during await |
| | | showConnectTipQueue.TryDequeue(out int fetterID); |
| | | if (fetterID == 0) |
| | | { |
| | |
| | | connetionForm.Display(fetterID); |
| | | //显示1.5秒后关闭 |
| | | await UniTask.Delay(1500, cancellationToken: token); |
| | | if (this == null) return; // destroyed during await |
| | | connetionForm.SetActive(false); |
| | | } |
| | | |