| | |
| | | using System; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | changeHeroPosBtn.AddListener(() => |
| | | { |
| | | HeroUIManager.Instance.selectTeamType = TeamManager.Instance.GetMainTeamID(); |
| | | UIManager.Instance.OpenWindow<HeroPosWin>(); |
| | | UIManager.Instance.OpenWindowAsync<HeroPosWin>().Forget(); |
| | | }); |
| | | |
| | | autoBtn.AddListener(() => |
| | |
| | | { |
| | | return; |
| | | } |
| | | UIManager.Instance.OpenWindow<AutoFightWin>(); |
| | | UIManager.Instance.OpenWindowAsync<AutoFightWin>().Forget(); |
| | | }); |
| | | |
| | | |
| | |
| | | |
| | | FirstChargeBtn.AddListener(() => |
| | | { |
| | | UIManager.Instance.OpenWindow<FirstChargeWin>(); |
| | | UIManager.Instance.OpenWindowAsync<FirstChargeWin>().Forget(); |
| | | }); |
| | | |
| | | blessLVBtn.AddListener(() => |
| | |
| | | { |
| | | return; |
| | | } |
| | | UIManager.Instance.OpenWindow<BlessLVWin>(); |
| | | UIManager.Instance.OpenWindowAsync<BlessLVWin>().Forget(); |
| | | }); |
| | | |
| | | mailBtn.AddListener(() => |
| | | { |
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Mail, true)) |
| | | return; |
| | | UIManager.Instance.OpenWindow<MailWin>(); |
| | | UIManager.Instance.OpenWindowAsync<MailWin>().Forget(); |
| | | }); |
| | | |
| | | officialUpBtn.AddListener(() => |
| | | { |
| | | if (RealmConfig.GetKeys().Count <= PlayerDatas.Instance.baseData.realmLevel) |
| | | return; |
| | | UIManager.Instance.OpenWindow<OfficialUpWin>(); |
| | | UIManager.Instance.OpenWindowAsync<OfficialUpWin>().Forget(); |
| | | }); |
| | | |
| | | restBtn.AddListener(GotoRest); |
| | |
| | | // { |
| | | // transFastChat.SetActive(false); |
| | | // transChatInfo.SetActive(true); |
| | | // UIManager.Instance.OpenWindow<ChatWin>(); |
| | | // UIManager.Instance.OpenWindowAsync<ChatWin>().Forget(); |
| | | // }); |
| | | |
| | | // btnFastChatSend.SetListener(() => |
| | |
| | | |
| | | osMainLevelBtn.AddListener(() => |
| | | { |
| | | UIManager.Instance.OpenWindow<OSMainLevelBaseWin>(); |
| | | UIManager.Instance.OpenWindowAsync<OSMainLevelBaseWin>().Forget(); |
| | | }); |
| | | osHeroCallBtn.AddListener(() => |
| | | { |
| | | UIManager.Instance.OpenWindow<OSHeroCallBaseWin>(); |
| | | UIManager.Instance.OpenWindowAsync<OSHeroCallBaseWin>().Forget(); |
| | | }); |
| | | osGalaBtn.AddListener(() => |
| | | { |
| | | UIManager.Instance.OpenWindow<OSGalaBaseWin>(); |
| | | UIManager.Instance.OpenWindowAsync<OSGalaBaseWin>().Forget(); |
| | | }); |
| | | |
| | | DailySpecialsBtns.AddListener(() => |
| | | { |
| | | UIManager.Instance.OpenWindow<DailySpecialsBaseWin>(); |
| | | UIManager.Instance.OpenWindowAsync<DailySpecialsBaseWin>().Forget(); |
| | | }); |
| | | |
| | | } |
| | |
| | | Display(); |
| | | DisplayFirstChargeBtn(); |
| | | DisplayOSActivity(); |
| | | timingGiftCell.InitUI(); |
| | | timingGiftCell.InitUI().Forget(); |
| | | |
| | | DisplayTimeRush(); |
| | | |
| | |
| | | |
| | | private void OnShowGiftIdListAddEvent() |
| | | { |
| | | timingGiftCell.InitUI(); |
| | | timingGiftCell.InitUI().Forget(); |
| | | } |
| | | |
| | | private void OnAutoAttackEvent() |
| | |
| | | break; |
| | | } |
| | | } |
| | | UIManager.Instance.OpenWindow<ChatWin>(); |
| | | UIManager.Instance.OpenWindowAsync<ChatWin>().Forget(); |
| | | } |
| | | |
| | | public string GetMainChatAreaContent(TalkData talkData) |
| | |
| | | { |
| | | if (chatBulletViewPrefab == null) |
| | | { |
| | | chatBulletViewPrefab = UIUtility.CreateWidget("ChatBulletView", "ChatBulletView"); |
| | | //chatBulletViewPrefab = UIUtility.CreateWidget("ChatBulletView", "ChatBulletView"); |
| | | |
| | | UIUtility.CreateWidget("ChatBulletView", "ChatBulletView").ContinueWith(prefab => |
| | | { |
| | | if (this == null) |
| | | { |
| | | if (prefab != null) |
| | | { |
| | | GameObject.DestroyImmediate(prefab); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | chatBulletViewPrefab = prefab; |
| | | chatBulletViewPrefab.transform.SetParentEx(transChatBulletView.transform, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | }).Forget(); |
| | | } |
| | | chatBulletViewPrefab.transform.SetParentEx(transChatBulletView.transform, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | else |
| | | { |
| | | chatBulletViewPrefab.transform.SetParentEx(transChatBulletView.transform, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | } |
| | | |
| | | // 新增:确保 ChatBulletView 组件启用 |
| | | // var chatBulletView = chatBulletViewPrefab.GetComponent<ChatBulletView>(); |
| | | // if (chatBulletView != null) |
| | |
| | | await UniTask.Delay(1200); |
| | | if (this == null) return; // destroyed during await |
| | | if (!SoundPlayer.Instance.IsPlayBackGroundMuisic()) |
| | | SoundPlayer.Instance.PlayBackGroundMusic(38); |
| | | await SoundPlayer.Instance.PlayBackGroundMusic(38); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | // if (null != battleField) |
| | | // { |
| | | // StoryBossBattleWin fsBattleWin = UIManager.Instance.OpenWindow<StoryBossBattleWin>(); |
| | | // StoryBossBattleWin fsBattleWin = UIManager.Instance.OpenWindowAsync<StoryBossBattleWin>().Forget(); |
| | | // fsBattleWin.SetBattleField(battleField); |
| | | // return; |
| | | // } |
| | | |
| | | UIManager.Instance.OpenWindow<MainBossEnterWin>(); |
| | | UIManager.Instance.OpenWindowAsync<MainBossEnterWin>().Forget(); |
| | | } |
| | | |
| | | int lastLV = 0; |
| | |
| | | } |
| | | else if (funcId == (int)FuncOpenEnum.TimingGift) |
| | | { |
| | | timingGiftCell.InitUI(); |
| | | timingGiftCell.InitUI().Forget(); |
| | | } |
| | | else if (funcId == (int)FuncOpenEnum.TimeRush) |
| | | { |
| | |
| | | horseBGImg.SetActive(true); |
| | | //equipShowSwitch;//当前配置的坐骑外观ID存储在(最大支持 1~999) |
| | | var skinConfig = HorseSkinConfig.Get(HorseManager.Instance.GetUsingHorseSkinID(true)); |
| | | horseImg.Create(skinConfig.SkinID, 0, 0.6f); |
| | | horseImg.Create(skinConfig.SkinID, 0, 0.6f).Forget(); |
| | | horseLVText.text = Language.Get("Horse8", HorseManager.Instance.classLV, HorseManager.Instance.horseLV); |
| | | } |
| | | else |
| | |
| | | { |
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Horse, true)) |
| | | { |
| | | UIManager.Instance.OpenWindow<HorseWin>(); |
| | | UIManager.Instance.OpenWindowAsync<HorseWin>().Forget(); |
| | | } |
| | | } |
| | | |