【UI】修改部分UI相关、调整日志

iOS_release
zhangaotian 2024-07-19 11:19:30 +08:00
parent db581db850
commit 2ad788daf0
15 changed files with 40 additions and 63 deletions

@ -1 +1 @@
Subproject commit 91f9a78e6109ee30467fb1f0532756e549d5e861 Subproject commit 438cf8673e7e3ea212683cb534ba8aae243479f8

View File

@ -320,7 +320,15 @@ public class BuildBoot : MonoBehaviour
} }
else 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
} }
} }
/// <summary> /// <summary>
/// 初始化UI /// 初始化UI
/// </summary> /// </summary>
@ -496,11 +503,13 @@ public class BuildBoot : MonoBehaviour
private void ShowUI() private void ShowUI()
{ {
_uiMainBuild.SetActive(true); _uiMainBuild.SetActive(true);
_curBubble.SetActive(true);
} }
private void HideUI() private void HideUI()
{ {
_uiMainBuild.SetActive(false); _uiMainBuild.SetActive(false);
_curBubble.SetActive(false);
} }
#endregion #endregion

View File

@ -1,9 +1,9 @@
using System.Collections.Generic;
using PhxhSDK; using PhxhSDK;
using UnityEngine; using UnityEngine;
using Framework.Constants; using Framework.Constants;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem; using UnityEngine.InputSystem;
using UnityEngine.EventSystems;
using System.Collections.Generic;
using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.EnhancedTouch; using UnityEngine.InputSystem.EnhancedTouch;
using Touch = UnityEngine.InputSystem.EnhancedTouch.Touch; using Touch = UnityEngine.InputSystem.EnhancedTouch.Touch;

View File

@ -16,7 +16,7 @@ namespace Framework.Manager
set set
{ {
AppInfoManager.Instance.SetLocalVersion(value); AppInfoManager.Instance.SetLocalVersion(value);
DebugUtil.LogWarning("本地版本更新至:{0}", value); DebugUtil.Log("本地版本更新至:{0}", value);
} }
} }
@ -26,7 +26,7 @@ namespace Framework.Manager
set set
{ {
AppInfoManager.Instance.SetRemoteVersion(value); AppInfoManager.Instance.SetRemoteVersion(value);
DebugUtil.LogWarning("远端版本更新至:{0}", value); DebugUtil.Log("远端版本更新至:{0}", value);
} }
} }

View File

@ -295,7 +295,7 @@ namespace Framework.UI
_WindowMeta(UIConstants.UIStartMain,UIWindowLayer.Normal); _WindowMeta(UIConstants.UIStartMain,UIWindowLayer.Normal);
_WindowMeta(UIConstants.UIBuyGoods, UIWindowLayer.Normal); _WindowMeta(UIConstants.UIBuyGoods, UIWindowLayer.Normal);
_WindowMeta(UIConstants.UIWinPanel, UIWindowLayer.Normal); _WindowMeta(UIConstants.UIWinPanel, UIWindowLayer.Normal);
_WindowMeta(UIConstants.UIMainPanel, UIWindowLayer.Normal); //_WindowMeta(UIConstants.UIMainPanel, UIWindowLayer.Normal);
_WindowMeta(UIConstants.UIStayTuned, UIWindowLayer.Normal); _WindowMeta(UIConstants.UIStayTuned, UIWindowLayer.Normal);
_WindowMeta(UIConstants.UILosePanel, UIWindowLayer.Normal); _WindowMeta(UIConstants.UILosePanel, UIWindowLayer.Normal);
_WindowMeta(UIConstants.UIPausePanel, UIWindowLayer.Normal); _WindowMeta(UIConstants.UIPausePanel, UIWindowLayer.Normal);

View File

@ -16,7 +16,7 @@ namespace Framework.Constants
public static readonly string UIWinPanel = "UIWinPanel"; public static readonly string UIWinPanel = "UIWinPanel";
public static readonly string UIBuyGoods = "UIBuyGoods"; public static readonly string UIBuyGoods = "UIBuyGoods";
public static readonly string UILosePanel = "UILosePanel"; 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 UIMainPanelBg = "UIMainPanelBG";
public static readonly string UIStayTuned = "UIStayTuned"; public static readonly string UIStayTuned = "UIStayTuned";
public static readonly string UIPausePanel = "UIPausePanel"; public static readonly string UIPausePanel = "UIPausePanel";

View File

@ -150,7 +150,7 @@ namespace Gameplay.Manager
var curADHelper = _adHelpers[_adSdkNames[_currentAdIndex]]; var curADHelper = _adHelpers[_adSdkNames[_currentAdIndex]];
DebugUtil.LogWarning("当前使用:{0} 平台播放广告", _adSdkNames[_currentAdIndex]); DebugUtil.Log("当前使用:{0} 平台播放广告", _adSdkNames[_currentAdIndex]);
var unitID = GetUnitID(id, _adSdkNames[_currentAdIndex]); var unitID = GetUnitID(id, _adSdkNames[_currentAdIndex]);
if (!string.IsNullOrEmpty(unitID)) if (!string.IsNullOrEmpty(unitID))
curADHelper.ShowRewardedAd(unitID, rewardSuccess, rewardFail); curADHelper.ShowRewardedAd(unitID, rewardSuccess, rewardFail);
@ -184,7 +184,7 @@ namespace Gameplay.Manager
return false; return false;
} }
DebugUtil.LogWarning("{0}重新加載:{1}", _adSdkNames[_currentAdIndex], unitID); DebugUtil.Log("{0}重新加載:{1}", _adSdkNames[_currentAdIndex], unitID);
curADHelper.LoadRewardedAdWithUnitId(unitID); curADHelper.LoadRewardedAdWithUnitId(unitID);
_currentAdIndex++; _currentAdIndex++;
if (_currentAdIndex >= _adHelpers.Count) if (_currentAdIndex >= _adHelpers.Count)
@ -197,7 +197,7 @@ namespace Gameplay.Manager
index++; index++;
} }
DebugUtil.LogWarning("当前可以播放的广告是:{0}", _adSdkNames[_currentAdIndex]); DebugUtil.Log("当前可以播放的广告是:{0}", _adSdkNames[_currentAdIndex]);
return true; return true;
} }
catch (Exception e) catch (Exception e)
@ -220,7 +220,7 @@ namespace Gameplay.Manager
} }
var curADHelper = _adHelpers[_adSdkNames[_currentAdIndex]]; var curADHelper = _adHelpers[_adSdkNames[_currentAdIndex]];
DebugUtil.LogWarning("当前使用:{0} 平台播放广告", _adSdkNames[_currentAdIndex]); DebugUtil.Log("当前使用:{0} 平台播放广告", _adSdkNames[_currentAdIndex]);
var unitID = GetUnitID(id, _adSdkNames[_currentAdIndex]); var unitID = GetUnitID(id, _adSdkNames[_currentAdIndex]);
if (!string.IsNullOrEmpty(unitID)) if (!string.IsNullOrEmpty(unitID))
curADHelper.ShowRewardedAd(unitID, rewardSuccess, rewardFail); curADHelper.ShowRewardedAd(unitID, rewardSuccess, rewardFail);
@ -241,7 +241,7 @@ namespace Gameplay.Manager
} }
var curADHelper = _adHelpers[_adSdkNames[_currentAdIndex]]; 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]); var unitID = GetUnitID(id, _adSdkNames[_currentAdIndex]);
if (!string.IsNullOrEmpty(unitID)) if (!string.IsNullOrEmpty(unitID))
curADHelper.LoadRewardedAdWithUnitId(unitID); curADHelper.LoadRewardedAdWithUnitId(unitID);

View File

@ -256,7 +256,7 @@ namespace Gameplay.Manager
CommonUIUtils.CaptureScreenshot(); CommonUIUtils.CaptureScreenshot();
BIManager.Instance.TrackEventLevel(Event.level_fail); BIManager.Instance.TrackEventLevel(Event.level_fail);
_levelLoseTime++; _levelLoseTime++;
DebugUtil.LogWarning("输掉关卡:{0},已经{1}次了", _lastLevelID, _levelLoseTime); //DebugUtil.LogWarning("输掉关卡:{0},已经{1}次了", _lastLevelID, _levelLoseTime);
EventManager.Instance.Send(EventManager.EventName.HideGfx); EventManager.Instance.Send(EventManager.EventName.HideGfx);
if (_levelLoseTime >= 2 && ADManager.Instance.CanShow(103)) 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.TrackEventLevel(Event.level_ad_show_success, "103", RandomProp.ToString());
BIManager.Instance.TrackEventLevelOnce(EventFirst.fte_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; _levelLoseTime = 0;
_adGetRandomPropSuccess?.Invoke(); _adGetRandomPropSuccess?.Invoke();
} }

View File

@ -41,7 +41,7 @@ public class UILevelSelectController : UIWindow
{ {
CloseWindow(); CloseWindow();
HideGfx(); HideGfx();
await UIManager.Instance.OpenWindow(UIConstants.UIMainPanel); await UIManager.Instance.OpenWindow(UIConstants.UIStartMain);
EventManager.Instance.Send(EventManager.EventName.ShowGfx); EventManager.Instance.Send(EventManager.EventName.ShowGfx);
} }

View File

@ -114,7 +114,7 @@ public class UILoginPanelController : UIWindow
private async void CloseWin() private async void CloseWin()
{ {
CloseWindow(); CloseWindow(true);
if (AppInfoManager.Instance.UpdateConfirm) if (AppInfoManager.Instance.UpdateConfirm)
{ {
await UIManager.Instance.OpenWindow(UIConstants.UISyncTip, _needHideGfx); await UIManager.Instance.OpenWindow(UIConstants.UISyncTip, _needHideGfx);

View File

@ -30,7 +30,7 @@ public class UISyncTipController : UIWindow
private void CloseUI() private void CloseUI()
{ {
CloseWindow(); CloseWindow(true);
if (!_needHideGfx) if (!_needHideGfx)
EventManager.Instance.Send(EventManager.EventName.ShowGfx); EventManager.Instance.Send(EventManager.EventName.ShowGfx);
} }

View File

@ -25,15 +25,16 @@ public class UITipsController : UIWindow
{ {
_onYes?.Invoke(); _onYes?.Invoke();
EventManager.Instance.Send(EventManager.EventName.ShowGfx); EventManager.Instance.Send(EventManager.EventName.ShowGfx);
CloseWindow(); CloseWindow(true);
}); });
BindButton("Tips_Panel/tip_Confirm/Btn/btn_Cancel", () => BindButton("Tips_Panel/tip_Confirm/Btn/btn_Cancel", () =>
{ {
_onCancel?.Invoke(); _onCancel?.Invoke();
EventManager.Instance.Send(EventManager.EventName.ShowGfx); EventManager.Instance.Send(EventManager.EventName.ShowGfx);
CloseWindow(); CloseWindow(true);
}); });
} }
protected override void OnOpenWindow(object data) protected override void OnOpenWindow(object data)
{ {
_rawImageGaussianBlurMask.texture = CommonUIUtils.RenderTexture; _rawImageGaussianBlurMask.texture = CommonUIUtils.RenderTexture;

View File

@ -34,9 +34,9 @@ public class UIUserAgreementController : UIWindow
private void OnAgree() 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); BIManager.Instance.TrackEventOnce(cfg.BI.EventFirst.fte_privacy_agree);
} }
} }

View File

@ -8,7 +8,6 @@ using Gameplay.Login;
using UnityEngine.UI; using UnityEngine.UI;
using Framework.Event; using Framework.Event;
using Framework.Manager; using Framework.Manager;
using UnityEngine.Events;
using Framework.Constants; using Framework.Constants;
using Event = cfg.BI.Event; using Event = cfg.BI.Event;
@ -33,10 +32,6 @@ public class UISettingPanelController : UIWindow
private int _musicVolume; private int _musicVolume;
private int _soundVolume; private int _soundVolume;
public UnityEvent onSave;
private string _idToken;
private bool _isLogout;
protected override void OnAwake() protected override void OnAwake()
{ {
//EventManager.Instance.Register(EventManager.EventName.LoginSuccess, UpdateID); //EventManager.Instance.Register(EventManager.EventName.LoginSuccess, UpdateID);
@ -49,7 +44,7 @@ public class UISettingPanelController : UIWindow
BindButton("BG_SettingPanel/Btn_Close", () => BindButton("BG_SettingPanel/Btn_Close", () =>
{ {
EventManager.Instance.Send(EventManager.EventName.ShowGfx); EventManager.Instance.Send(EventManager.EventName.ShowGfx);
CloseWindow(); CloseWindow(true);
}); });
BindButton("BG_SettingPanel/Music/Btn_Switch_M", ChangeMusic); BindButton("BG_SettingPanel/Music/Btn_Switch_M", ChangeMusic);
BindButton("BG_SettingPanel/Sound/Btn_Switch_S", ChangeSound); BindButton("BG_SettingPanel/Sound/Btn_Switch_S", ChangeSound);
@ -64,7 +59,7 @@ public class UISettingPanelController : UIWindow
InitUI(); InitUI();
} }
private void SaveGameProgress() private async void SaveGameProgress()
{ {
BIManager.Instance.TrackEvent(Event.click_save); BIManager.Instance.TrackEvent(Event.click_save);
BIManager.Instance.TrackEventOnce(EventFirst.fte_click_save); BIManager.Instance.TrackEventOnce(EventFirst.fte_click_save);
@ -72,7 +67,7 @@ public class UISettingPanelController : UIWindow
if (Application.internetReachability == NetworkReachability.NotReachable || if (Application.internetReachability == NetworkReachability.NotReachable ||
!AppInfoManager.Instance.GetRemoteInfo) !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); BIManager.Instance.TrackEvent(Event.save_no_net);
} }
//已经登录 //已经登录
@ -88,11 +83,10 @@ public class UISettingPanelController : UIWindow
else else
{ {
BIManager.Instance.TrackEvent(Event.save_show_login); 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) private void ChangLanguage(int value)
{ {
var language = value == 0 ? StringManager.LanguageType.CN : StringManager.LanguageType.EN; var language = value == 0 ? StringManager.LanguageType.CN : StringManager.LanguageType.EN;
@ -111,33 +105,11 @@ public class UISettingPanelController : UIWindow
protected override void OnOpenWindow(object data) protected override void OnOpenWindow(object data)
{ {
UpdateID();
EventManager.Instance.Send(EventManager.EventName.HideGfx); EventManager.Instance.Send(EventManager.EventName.HideGfx);
_rawImageGaussianBlurMask.texture = CommonUIUtils.RenderTexture; _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() private void InitUI()
{ {
_isMuteMusic = Math.Abs(AudioManager.Instance.MusicVolume - 1f) > Double.Epsilon; _isMuteMusic = Math.Abs(AudioManager.Instance.MusicVolume - 1f) > Double.Epsilon;
@ -148,7 +120,6 @@ public class UISettingPanelController : UIWindow
void UpdateID() void UpdateID()
{ {
_account.text = LoginManager.Instance.Account; _account.text = LoginManager.Instance.Account;
onSave?.Invoke();
} }
private void UpdateUI() private void UpdateUI()
@ -158,10 +129,6 @@ public class UISettingPanelController : UIWindow
_uiBtnOpenS.SetActive(!_isMuteSound); _uiBtnOpenS.SetActive(!_isMuteSound);
_uiBtnCloseS.SetActive(_isMuteSound); _uiBtnCloseS.SetActive(_isMuteSound);
_account.text = LoginManager.Instance.Account; _account.text = LoginManager.Instance.Account;
#if SDK_FIREBASE
//FindObj("BG_SettingPanel/FaceBook").gameObject.SetActive(true);
#endif
} }
private void ChangeMusic() private void ChangeMusic()

View File

@ -98,7 +98,7 @@ public class UIStartMainController : UIWindow
var levelID = $"level{LevelSelectManager.Instance.CurPassLevelIndex + 1}"; var levelID = $"level{LevelSelectManager.Instance.CurPassLevelIndex + 1}";
if (LevelManager.Instance.IsLevelExist(levelID)) if (LevelManager.Instance.IsLevelExist(levelID))
{ {
CloseWindow(); CloseWindow(true);
GameStateManager.Instance.ChangeState(new LevelState(levelID)); GameStateManager.Instance.ChangeState(new LevelState(levelID));
} }
else else
@ -113,7 +113,7 @@ public class UIStartMainController : UIWindow
/// </summary> /// </summary>
private async void OnSelectLevel() private async void OnSelectLevel()
{ {
CloseWindow(); CloseWindow(true);
BIManager.Instance.TrackEvent(Event.click_level_select); BIManager.Instance.TrackEvent(Event.click_level_select);
await UIManager.Instance.OpenWindow(UIConstants.UILevelSelect); await UIManager.Instance.OpenWindow(UIConstants.UILevelSelect);
} }