diff --git a/Forest/Assets/Art/GameBuild/Prefab/UIMainBuild.prefab b/Forest/Assets/Art/GameBuild/Prefab/UIMainBuild.prefab index 3d386b3..723859a 100644 --- a/Forest/Assets/Art/GameBuild/Prefab/UIMainBuild.prefab +++ b/Forest/Assets/Art/GameBuild/Prefab/UIMainBuild.prefab @@ -903,7 +903,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 2e81fc769e698417b8c13280d690cd9f, type: 3} + m_Sprite: {fileID: 21300000, guid: 1852525e762024990811d841c56436c9, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/Forest/Assets/Art/GameBuild/Texture/BuildUI/Bar_Yes.png b/Forest/Assets/Art/GameBuild/Texture/BuildUI/Bar_Yes.png index b61af71..26544da 100644 Binary files a/Forest/Assets/Art/GameBuild/Texture/BuildUI/Bar_Yes.png and b/Forest/Assets/Art/GameBuild/Texture/BuildUI/Bar_Yes.png differ diff --git a/Forest/Assets/Art/GameBuild/Texture/BuildUI/Bar_Yes.png.meta b/Forest/Assets/Art/GameBuild/Texture/BuildUI/Bar_Yes.png.meta index 9691b55..b945beb 100644 --- a/Forest/Assets/Art/GameBuild/Texture/BuildUI/Bar_Yes.png.meta +++ b/Forest/Assets/Art/GameBuild/Texture/BuildUI/Bar_Yes.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2e81fc769e698417b8c13280d690cd9f +guid: 1852525e762024990811d841c56436c9 TextureImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/Forest/Assets/Scripts/Framework/Guide/GuideMananger.cs b/Forest/Assets/Scripts/Framework/Guide/GuideMananger.cs index c35cecf..21c3633 100644 --- a/Forest/Assets/Scripts/Framework/Guide/GuideMananger.cs +++ b/Forest/Assets/Scripts/Framework/Guide/GuideMananger.cs @@ -179,7 +179,7 @@ public class GuideMananger : Singlenton, IInitable BuildManager.Instance.SetBuildUserInfo(_curGuideGroup); _curGuideGroup = nextGroup; IsGuiding = false; - LevelSelectManager.Instance.SaveNewPassLevel(PassLevelID); + LevelSelectManager.Instance.SaveNewPassLevel(PassLevelID, false); SetActiveGuideUI(false, true); } else diff --git a/Forest/Assets/Scripts/Gameplay/Manager/LevelSelectManager.cs b/Forest/Assets/Scripts/Gameplay/Manager/LevelSelectManager.cs index f7862b2..7c8ef4b 100644 --- a/Forest/Assets/Scripts/Gameplay/Manager/LevelSelectManager.cs +++ b/Forest/Assets/Scripts/Gameplay/Manager/LevelSelectManager.cs @@ -56,7 +56,7 @@ namespace Gameplay.Manager CurPassLevelIndex = int.Parse(CurPassLevel.Substring("level".Length)); } - public void SaveNewPassLevel(string levelID) + public void SaveNewPassLevel(string levelID, bool flyCoin = true) { if (GuideMananger.Instance.IsGuiding) { @@ -74,7 +74,7 @@ namespace Gameplay.Manager StorageManager.Instance.SyncForce = true; StorageManager.Instance.SyncRemoteForce = true; BIManager.Instance.TrackEvent(cfg.BI.Event.main_unlock_level, (id + 1).ToString()); - LevelManager.Instance.CanGfxCoin = true; + LevelManager.Instance.CanGfxCoin = flyCoin; } } diff --git a/Forest/Assets/Scripts/Gameplay/UI/EndPanel/UILosePanelController.cs b/Forest/Assets/Scripts/Gameplay/UI/EndPanel/UILosePanelController.cs index 8172df2..c06f6bb 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/EndPanel/UILosePanelController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/EndPanel/UILosePanelController.cs @@ -35,7 +35,7 @@ public class UILosePanelController : UIWindow private void BackToMainPanel() { - CloseWindow(); + CloseWindow(true); UIManager.Instance.CloseWindow(UIConstants.UILevelPanel, true); GameStateManager.Instance.ChangeState(new GameStateStart()); BIManager.Instance.TrackEventLevel(cfg.BI.Event.level_back_home, BIManager.Reason.ClickOnLosePanel.ToString()); @@ -43,14 +43,14 @@ public class UILosePanelController : UIWindow private void TryAgain() { - CloseWindow(); + CloseWindow(true); GameStateManager.Instance.ChangeState(new LevelState(LevelManager.Instance.CurrentLevel.ID)); BIManager.Instance.TrackEventLevel(cfg.BI.Event.level_retry, BIManager.Reason.ClickOnLosePanel.ToString()); } private void SkipLevel() { - CloseWindow(); + CloseWindow(true); BIManager.Instance.TrackEventLevel(cfg.BI.Event.level_skip); EventManager.Instance.Send(EventManager.EventName.LevelGameWin); } @@ -60,10 +60,10 @@ public class UILosePanelController : UIWindow LevelManager.Instance.WatchADGetTime(() => { CloseWindow(); }, ADFailCallBack); } - private void ADFailCallBack() + private async void ADFailCallBack() { BIManager.Instance.TrackEventLevel(Event.level_ad_show_fail, "102"); BIManager.Instance.TrackEventLevelOnce(EventFirst.fte_level_ad_show_fail, "102"); - UIManager.Instance.OpenWindow(UIConstants.UITips, "Tip_AD_NotReady", () => { }); + await UIManager.Instance.OpenWindow(UIConstants.UITips, "Tip_AD_NotReady", () => { }); } } \ No newline at end of file diff --git a/Forest/Assets/Scripts/Gameplay/UI/EndPanel/UIWinPanelController.cs b/Forest/Assets/Scripts/Gameplay/UI/EndPanel/UIWinPanelController.cs index 2dba7e2..e9c4316 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/EndPanel/UIWinPanelController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/EndPanel/UIWinPanelController.cs @@ -73,7 +73,7 @@ public class UIWinPanelController : UIWindow { BIManager.Instance.TrackEventLevel(cfg.BI.Event.level_back_home, BIManager.Reason.ClickOnWinPanel.ToString()); - CloseWindow(); + CloseWindow(true); UIManager.Instance.CloseWindow(UIConstants.UILevelPanel, true); GameStateManager.Instance.ChangeState(new GameStateStart()); EventManager.Instance.Send(EventManager.EventName.StartBackToMain); @@ -91,7 +91,7 @@ public class UIWinPanelController : UIWindow private async void NextLevel() { - CloseWindow(); + CloseWindow(true); BIManager.Instance.TrackEventLevel(cfg.BI.Event.level_next_level); UIManager.Instance.CloseWindow(UIConstants.UIPausePanel); var nextLevelID = LevelManager.Instance.CurrentLevel.GetLevelIndex() + 1; diff --git a/Forest/Assets/Scripts/Gameplay/UI/Level/CoinEffect.cs b/Forest/Assets/Scripts/Gameplay/UI/Level/CoinEffect.cs index ed64d43..0e566c9 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/Level/CoinEffect.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/Level/CoinEffect.cs @@ -1,3 +1,4 @@ +using System; using UnityEngine; using DG.Tweening; using System.Collections; @@ -53,10 +54,27 @@ public class CoinEffect : MonoBehaviour private void Update() { - if (LevelManager.Instance.CanGfxCoin) + if (LevelManager.Instance.CanGfxCoin && !GuideMananger.Instance.IsGuiding) { + DestroyCoinsParent(); LevelManager.Instance.CanGfxCoin = false; CoinEffectShow(); } } + + private void DestroyCoinsParent() + { + if (targetPos) + { + foreach (Transform obj in targetPos) + { + Destroy(obj.gameObject); + } + } + } + + private void OnDestroy() + { + DestroyCoinsParent(); + } } \ No newline at end of file diff --git a/Forest/Assets/Scripts/Gameplay2/BuildManager.cs b/Forest/Assets/Scripts/Gameplay2/BuildManager.cs index 0d66fd2..00b9d65 100644 --- a/Forest/Assets/Scripts/Gameplay2/BuildManager.cs +++ b/Forest/Assets/Scripts/Gameplay2/BuildManager.cs @@ -287,7 +287,6 @@ namespace Framework.Manager if (string.IsNullOrEmpty(_userBuildInfo.CurBuildId)) { _userBuildInfo.CurBuildId = TableManager.Instance.Tables.BuildConfig.DataList[0].ID; - DebugUtil.LogError("无存盘信息, 读默认表:{0}", _userBuildInfo.CurBuildId); } } @@ -295,7 +294,6 @@ namespace Framework.Manager { if (_isInit && !ChangeBuildSceneID) return; - DebugUtil.LogError("当前建造ID:{0}", buildData.buildID); BuildInGame = inGame; _curBuildData = buildData; _nodeInfos = new Dictionary(); @@ -385,7 +383,6 @@ namespace Framework.Manager } _userBuildInfo.AllChooseNodeInfo[curBuildID].ChooseNodeInfo.TryAdd(nodeInfo.Key, ""); - DebugUtil.LogError("当前场景:{0},添加了信息节点:{1},选项:{2}", curBuildID, nodeInfo.Key, ""); } _curBuildInfo = _userBuildInfo.AllChooseNodeInfo[curBuildID];