diff --git a/Forest/Assets/PhxhSDK b/Forest/Assets/PhxhSDK index 91f9a78..438cf86 160000 --- a/Forest/Assets/PhxhSDK +++ b/Forest/Assets/PhxhSDK @@ -1 +1 @@ -Subproject commit 91f9a78e6109ee30467fb1f0532756e549d5e861 +Subproject commit 438cf8673e7e3ea212683cb534ba8aae243479f8 diff --git a/Forest/Assets/Scripts/Framework/GameBuild/BuildBoot.cs b/Forest/Assets/Scripts/Framework/GameBuild/BuildBoot.cs index 1a5d734..3c8596c 100644 --- a/Forest/Assets/Scripts/Framework/GameBuild/BuildBoot.cs +++ b/Forest/Assets/Scripts/Framework/GameBuild/BuildBoot.cs @@ -320,7 +320,15 @@ public class BuildBoot : MonoBehaviour } else { - node.CloseAllOptionButBubble(node.Name.Equals(nextLockNode)); + if (node.Name.Equals(nextLockNode)) + { + _curBubble = node.BubbleObj; + node.CloseAllOptionButBubble(true); + } + else + { + node.CloseAllOptionButBubble(false); + } } } } @@ -387,7 +395,6 @@ public class BuildBoot : MonoBehaviour } } - /// /// 初始化UI /// @@ -496,11 +503,13 @@ public class BuildBoot : MonoBehaviour private void ShowUI() { _uiMainBuild.SetActive(true); + _curBubble.SetActive(true); } private void HideUI() { _uiMainBuild.SetActive(false); + _curBubble.SetActive(false); } #endregion diff --git a/Forest/Assets/Scripts/Framework/Manager/InputManager.cs b/Forest/Assets/Scripts/Framework/Manager/InputManager.cs index 450234e..6ff6199 100644 --- a/Forest/Assets/Scripts/Framework/Manager/InputManager.cs +++ b/Forest/Assets/Scripts/Framework/Manager/InputManager.cs @@ -1,9 +1,9 @@ -using System.Collections.Generic; using PhxhSDK; using UnityEngine; using Framework.Constants; -using UnityEngine.EventSystems; using UnityEngine.InputSystem; +using UnityEngine.EventSystems; +using System.Collections.Generic; using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.EnhancedTouch; using Touch = UnityEngine.InputSystem.EnhancedTouch.Touch; diff --git a/Forest/Assets/Scripts/Framework/Manager/StorageManager.cs b/Forest/Assets/Scripts/Framework/Manager/StorageManager.cs index 3c59d43..174a2a7 100644 --- a/Forest/Assets/Scripts/Framework/Manager/StorageManager.cs +++ b/Forest/Assets/Scripts/Framework/Manager/StorageManager.cs @@ -16,7 +16,7 @@ namespace Framework.Manager set { AppInfoManager.Instance.SetLocalVersion(value); - DebugUtil.LogWarning("本地版本更新至:{0}", value); + DebugUtil.Log("本地版本更新至:{0}", value); } } @@ -26,7 +26,7 @@ namespace Framework.Manager set { AppInfoManager.Instance.SetRemoteVersion(value); - DebugUtil.LogWarning("远端版本更新至:{0}", value); + DebugUtil.Log("远端版本更新至:{0}", value); } } diff --git a/Forest/Assets/Scripts/Framework/UI/UIManager.cs b/Forest/Assets/Scripts/Framework/UI/UIManager.cs index 36b39d2..8f0882d 100644 --- a/Forest/Assets/Scripts/Framework/UI/UIManager.cs +++ b/Forest/Assets/Scripts/Framework/UI/UIManager.cs @@ -295,7 +295,7 @@ namespace Framework.UI _WindowMeta(UIConstants.UIStartMain,UIWindowLayer.Normal); _WindowMeta(UIConstants.UIBuyGoods, UIWindowLayer.Normal); _WindowMeta(UIConstants.UIWinPanel, UIWindowLayer.Normal); - _WindowMeta(UIConstants.UIMainPanel, UIWindowLayer.Normal); + //_WindowMeta(UIConstants.UIMainPanel, UIWindowLayer.Normal); _WindowMeta(UIConstants.UIStayTuned, UIWindowLayer.Normal); _WindowMeta(UIConstants.UILosePanel, UIWindowLayer.Normal); _WindowMeta(UIConstants.UIPausePanel, UIWindowLayer.Normal); diff --git a/Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs b/Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs index 414810d..f07e0de 100644 --- a/Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs +++ b/Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs @@ -16,7 +16,7 @@ namespace Framework.Constants public static readonly string UIWinPanel = "UIWinPanel"; public static readonly string UIBuyGoods = "UIBuyGoods"; public static readonly string UILosePanel = "UILosePanel"; - public static readonly string UIMainPanel = "UIMainPanel"; + //public static readonly string UIMainPanel = "UIMainPanel"; public static readonly string UIMainPanelBg = "UIMainPanelBG"; public static readonly string UIStayTuned = "UIStayTuned"; public static readonly string UIPausePanel = "UIPausePanel"; diff --git a/Forest/Assets/Scripts/Gameplay/Manager/ADManager.cs b/Forest/Assets/Scripts/Gameplay/Manager/ADManager.cs index 621aa44..6f17e6c 100644 --- a/Forest/Assets/Scripts/Gameplay/Manager/ADManager.cs +++ b/Forest/Assets/Scripts/Gameplay/Manager/ADManager.cs @@ -150,7 +150,7 @@ namespace Gameplay.Manager var curADHelper = _adHelpers[_adSdkNames[_currentAdIndex]]; - DebugUtil.LogWarning("当前使用:{0} 平台播放广告", _adSdkNames[_currentAdIndex]); + DebugUtil.Log("当前使用:{0} 平台播放广告", _adSdkNames[_currentAdIndex]); var unitID = GetUnitID(id, _adSdkNames[_currentAdIndex]); if (!string.IsNullOrEmpty(unitID)) curADHelper.ShowRewardedAd(unitID, rewardSuccess, rewardFail); @@ -184,7 +184,7 @@ namespace Gameplay.Manager return false; } - DebugUtil.LogWarning("{0}重新加載:{1}", _adSdkNames[_currentAdIndex], unitID); + DebugUtil.Log("{0}重新加載:{1}", _adSdkNames[_currentAdIndex], unitID); curADHelper.LoadRewardedAdWithUnitId(unitID); _currentAdIndex++; if (_currentAdIndex >= _adHelpers.Count) @@ -197,7 +197,7 @@ namespace Gameplay.Manager index++; } - DebugUtil.LogWarning("当前可以播放的广告是:{0}", _adSdkNames[_currentAdIndex]); + DebugUtil.Log("当前可以播放的广告是:{0}", _adSdkNames[_currentAdIndex]); return true; } catch (Exception e) @@ -220,7 +220,7 @@ namespace Gameplay.Manager } var curADHelper = _adHelpers[_adSdkNames[_currentAdIndex]]; - DebugUtil.LogWarning("当前使用:{0} 平台播放广告", _adSdkNames[_currentAdIndex]); + DebugUtil.Log("当前使用:{0} 平台播放广告", _adSdkNames[_currentAdIndex]); var unitID = GetUnitID(id, _adSdkNames[_currentAdIndex]); if (!string.IsNullOrEmpty(unitID)) curADHelper.ShowRewardedAd(unitID, rewardSuccess, rewardFail); @@ -241,7 +241,7 @@ namespace Gameplay.Manager } var curADHelper = _adHelpers[_adSdkNames[_currentAdIndex]]; - DebugUtil.LogWarning("{0} 平台重新加载广告位:{1}", _adSdkNames[_currentAdIndex], id); + DebugUtil.Log("{0} 平台重新加载广告位:{1}", _adSdkNames[_currentAdIndex], id); var unitID = GetUnitID(id, _adSdkNames[_currentAdIndex]); if (!string.IsNullOrEmpty(unitID)) curADHelper.LoadRewardedAdWithUnitId(unitID); diff --git a/Forest/Assets/Scripts/Gameplay/Manager/LevelManager.cs b/Forest/Assets/Scripts/Gameplay/Manager/LevelManager.cs index bd83676..eff02f7 100644 --- a/Forest/Assets/Scripts/Gameplay/Manager/LevelManager.cs +++ b/Forest/Assets/Scripts/Gameplay/Manager/LevelManager.cs @@ -256,7 +256,7 @@ namespace Gameplay.Manager CommonUIUtils.CaptureScreenshot(); BIManager.Instance.TrackEventLevel(Event.level_fail); _levelLoseTime++; - DebugUtil.LogWarning("输掉关卡:{0},已经{1}次了", _lastLevelID, _levelLoseTime); + //DebugUtil.LogWarning("输掉关卡:{0},已经{1}次了", _lastLevelID, _levelLoseTime); EventManager.Instance.Send(EventManager.EventName.HideGfx); if (_levelLoseTime >= 2 && ADManager.Instance.CanShow(103)) { @@ -510,7 +510,7 @@ namespace Gameplay.Manager BIManager.Instance.TrackEventLevel(Event.level_ad_show_success, "103", RandomProp.ToString()); BIManager.Instance.TrackEventLevelOnce(EventFirst.fte_level_ad_show_success, "103", RandomProp.ToString()); - DebugUtil.LogWarning("获取到的道具是:{0}", RandomProp); + DebugUtil.Log("获取到的道具是:{0}", RandomProp); _levelLoseTime = 0; _adGetRandomPropSuccess?.Invoke(); } diff --git a/Forest/Assets/Scripts/Gameplay/UI/Level/UILevelSelectController.cs b/Forest/Assets/Scripts/Gameplay/UI/Level/UILevelSelectController.cs index cd59fc7..0064cf6 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/Level/UILevelSelectController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/Level/UILevelSelectController.cs @@ -41,7 +41,7 @@ public class UILevelSelectController : UIWindow { CloseWindow(); HideGfx(); - await UIManager.Instance.OpenWindow(UIConstants.UIMainPanel); + await UIManager.Instance.OpenWindow(UIConstants.UIStartMain); EventManager.Instance.Send(EventManager.EventName.ShowGfx); } diff --git a/Forest/Assets/Scripts/Gameplay/UI/Other/UILoginPanelController.cs b/Forest/Assets/Scripts/Gameplay/UI/Other/UILoginPanelController.cs index d2d33d1..1712570 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/Other/UILoginPanelController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/Other/UILoginPanelController.cs @@ -114,7 +114,7 @@ public class UILoginPanelController : UIWindow private async void CloseWin() { - CloseWindow(); + CloseWindow(true); if (AppInfoManager.Instance.UpdateConfirm) { await UIManager.Instance.OpenWindow(UIConstants.UISyncTip, _needHideGfx); diff --git a/Forest/Assets/Scripts/Gameplay/UI/Other/UISyncTipController.cs b/Forest/Assets/Scripts/Gameplay/UI/Other/UISyncTipController.cs index 8ad32c7..feb215e 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/Other/UISyncTipController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/Other/UISyncTipController.cs @@ -30,7 +30,7 @@ public class UISyncTipController : UIWindow private void CloseUI() { - CloseWindow(); + CloseWindow(true); if (!_needHideGfx) EventManager.Instance.Send(EventManager.EventName.ShowGfx); } diff --git a/Forest/Assets/Scripts/Gameplay/UI/Other/UITipsController.cs b/Forest/Assets/Scripts/Gameplay/UI/Other/UITipsController.cs index 4a669de..323f2bd 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/Other/UITipsController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/Other/UITipsController.cs @@ -25,15 +25,16 @@ public class UITipsController : UIWindow { _onYes?.Invoke(); EventManager.Instance.Send(EventManager.EventName.ShowGfx); - CloseWindow(); + CloseWindow(true); }); BindButton("Tips_Panel/tip_Confirm/Btn/btn_Cancel", () => { _onCancel?.Invoke(); EventManager.Instance.Send(EventManager.EventName.ShowGfx); - CloseWindow(); + CloseWindow(true); }); } + protected override void OnOpenWindow(object data) { _rawImageGaussianBlurMask.texture = CommonUIUtils.RenderTexture; diff --git a/Forest/Assets/Scripts/Gameplay/UI/Other/UIUserAgreementController.cs b/Forest/Assets/Scripts/Gameplay/UI/Other/UIUserAgreementController.cs index a8db9e6..7e3664a 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/Other/UIUserAgreementController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/Other/UIUserAgreementController.cs @@ -34,9 +34,9 @@ public class UIUserAgreementController : UIWindow private void OnAgree() { - CloseWindow(); + CloseWindow(true); - UnityEngine.PlayerPrefs.SetInt(LevelConstants.FirstLaunch, 1); + PlayerPrefs.SetInt(LevelConstants.FirstLaunch, 1); BIManager.Instance.TrackEventOnce(cfg.BI.EventFirst.fte_privacy_agree); } } \ No newline at end of file diff --git a/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UISettingPanelController.cs b/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UISettingPanelController.cs index 8cf8be2..c2e3477 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UISettingPanelController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UISettingPanelController.cs @@ -8,7 +8,6 @@ using Gameplay.Login; using UnityEngine.UI; using Framework.Event; using Framework.Manager; -using UnityEngine.Events; using Framework.Constants; using Event = cfg.BI.Event; @@ -33,10 +32,6 @@ public class UISettingPanelController : UIWindow private int _musicVolume; private int _soundVolume; - public UnityEvent onSave; - private string _idToken; - private bool _isLogout; - protected override void OnAwake() { //EventManager.Instance.Register(EventManager.EventName.LoginSuccess, UpdateID); @@ -49,7 +44,7 @@ public class UISettingPanelController : UIWindow BindButton("BG_SettingPanel/Btn_Close", () => { EventManager.Instance.Send(EventManager.EventName.ShowGfx); - CloseWindow(); + CloseWindow(true); }); BindButton("BG_SettingPanel/Music/Btn_Switch_M", ChangeMusic); BindButton("BG_SettingPanel/Sound/Btn_Switch_S", ChangeSound); @@ -64,7 +59,7 @@ public class UISettingPanelController : UIWindow InitUI(); } - private void SaveGameProgress() + private async void SaveGameProgress() { BIManager.Instance.TrackEvent(Event.click_save); BIManager.Instance.TrackEventOnce(EventFirst.fte_click_save); @@ -72,7 +67,7 @@ public class UISettingPanelController : UIWindow if (Application.internetReachability == NetworkReachability.NotReachable || !AppInfoManager.Instance.GetRemoteInfo) { - UIManager.Instance.OpenWindow(UIConstants.UITips, "Save_Nonet"); + await UIManager.Instance.OpenWindow(UIConstants.UITips, "Save_Nonet"); BIManager.Instance.TrackEvent(Event.save_no_net); } //已经登录 @@ -88,11 +83,10 @@ public class UISettingPanelController : UIWindow else { BIManager.Instance.TrackEvent(Event.save_show_login); - UIManager.Instance.OpenWindow(UIConstants.UILogin, true); + await UIManager.Instance.OpenWindow(UIConstants.UILogin, true); } } - private void ChangLanguage(int value) { var language = value == 0 ? StringManager.LanguageType.CN : StringManager.LanguageType.EN; @@ -111,33 +105,11 @@ public class UISettingPanelController : UIWindow protected override void OnOpenWindow(object data) { + UpdateID(); EventManager.Instance.Send(EventManager.EventName.HideGfx); _rawImageGaussianBlurMask.texture = CommonUIUtils.RenderTexture; } - private void Start() - { - onSave = onSave ?? new UnityEvent(); - onSave.AddListener(() => - { - if (!string.IsNullOrEmpty(_idToken) || _isLogout) - { - PlayerPrefs.SetString("idToken", _idToken); - PlayerPrefs.Save(); - _isLogout = false; - } - }); - } - - private void OnEnable() - { - UpdateID(); - } - - private void OnDisable() - { - } - private void InitUI() { _isMuteMusic = Math.Abs(AudioManager.Instance.MusicVolume - 1f) > Double.Epsilon; @@ -148,7 +120,6 @@ public class UISettingPanelController : UIWindow void UpdateID() { _account.text = LoginManager.Instance.Account; - onSave?.Invoke(); } private void UpdateUI() @@ -158,10 +129,6 @@ public class UISettingPanelController : UIWindow _uiBtnOpenS.SetActive(!_isMuteSound); _uiBtnCloseS.SetActive(_isMuteSound); _account.text = LoginManager.Instance.Account; - -#if SDK_FIREBASE - //FindObj("BG_SettingPanel/FaceBook").gameObject.SetActive(true); -#endif } private void ChangeMusic() diff --git a/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UIStartMainController.cs b/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UIStartMainController.cs index 450ac62..d68929b 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UIStartMainController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UIStartMainController.cs @@ -98,7 +98,7 @@ public class UIStartMainController : UIWindow var levelID = $"level{LevelSelectManager.Instance.CurPassLevelIndex + 1}"; if (LevelManager.Instance.IsLevelExist(levelID)) { - CloseWindow(); + CloseWindow(true); GameStateManager.Instance.ChangeState(new LevelState(levelID)); } else @@ -113,7 +113,7 @@ public class UIStartMainController : UIWindow /// private async void OnSelectLevel() { - CloseWindow(); + CloseWindow(true); BIManager.Instance.TrackEvent(Event.click_level_select); await UIManager.Instance.OpenWindow(UIConstants.UILevelSelect); }