Browse Source

添加音效

lzx 14 hours ago
parent
commit
96cf08fdf5

+ 1 - 1
Assets/Res/UI/DaoYouPanel/DaoYouInfoPanel.prefab

@@ -1232,7 +1232,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 197.0892, y: -38}
+  m_AnchoredPosition: {x: 197.0892, y: -53}
   m_SizeDelta: {x: 394.1784, y: 0}
   m_Pivot: {x: 0.5, y: 0}
 --- !u!222 &8219955351092879517

+ 1 - 1
Assets/Res/UI/HeroInformainPanel/HeroBreakthroughPanel.prefab

@@ -3386,7 +3386,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 148, y: -22.3432}
-  m_SizeDelta: {x: 0, y: 43.2862}
+  m_SizeDelta: {x: 210, y: 43.2862}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &8334097589539832799
 CanvasRenderer:

+ 2 - 1
Assets/Scripts/GameUI/UI/DaoYouPanel/DaoYouInfoPanel.cs

@@ -1,5 +1,6 @@
 using System.Collections.Generic;
 using System.Linq;
+using Core.Audio;
 using Core.Language;
 using Excel2Json;
 using Fort23.Core;
@@ -163,7 +164,7 @@ namespace Fort23.Mono
                             daoYouData.favorabilityLv++;
                         }
                     }
-
+                    AudioManager.Instance.PlayAudio("ui_shiyonghuode");
                     AccountFileInfo.Instance.SavePlayerData();
                 }
                 //加心情

+ 3 - 0
Assets/Scripts/GameUI/UI/DaoYouPanel/DaoYouInvitePanel.cs

@@ -1,6 +1,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Runtime.InteropServices;
+using Core.Audio;
 using Excel2Json;
 using Fort23.Core;
 using Fort23.UTool;
@@ -43,11 +44,13 @@ namespace Fort23.Mono
 
                 if (!PlayerManager.Instance.myHero.heroData.ImmortalBond.Contains(addDaoYouWidget._daoYouData.id))
                 {
+                    AudioManager.Instance.PlayAudio("ui_shangzhengdaolv.wav");
                     PlayerManager.Instance.myHero.heroData.ImmortalBond.Add(addDaoYouWidget._daoYouData.id);
                     PlayerManager.Instance.myHero.ComputeHeroInfo();
                     AccountFileInfo.Instance.SavePlayerData();
                     addDaoYouWidget = null;
                     UIManager.Instance.HideUIUIPanel(this);
+                    
                 }
             });
         }

+ 2 - 0
Assets/Scripts/GameUI/UI/HeroInformationPanel/UseExpElixirPanel.cs

@@ -1,5 +1,6 @@
 using System.Collections.Generic;
 using System.Linq;
+using Core.Audio;
 using Excel2Json;
 using Fort23.Core;
 using Fort23.UTool;
@@ -61,6 +62,7 @@ namespace Fort23.Mono
                 PlayerManager.Instance.myHero.heroData.exp += elixirItemWidget.ItemConfig.associateVlaue[0];
                 AccountFileInfo.Instance.playerData.todayUseExpElixrPanelCount++;
                 AccountFileInfo.Instance.SavePlayerData();
+                AudioManager.Instance.PlayAudio("ui_shiyonghuode");
             }
             else
             {

+ 12 - 7
Assets/Scripts/GameUI/UI/MainPanel/MainPanel.cs

@@ -1,5 +1,6 @@
 using System.Collections.Generic;
 using System.Linq;
+using Core.Audio;
 using Core.Language;
 using Excel2Json;
 using Fort23.Core;
@@ -91,6 +92,14 @@ namespace Fort23.Mono
             CreatShengShiEvent();
             ChagneShenshiBtnActive();
             Slider_SmallJD.value = PlayerManager.Instance.CurrentsmallPlaces.completionEventCount;
+            SmallPlacesConfig smallPlacesConfig =
+                ConfigComponent.Instance.Get<SmallPlacesConfig>(PlayerManager.Instance.CurrentsmallPlaces.id);
+
+            if (PlayerManager.Instance.CurrentsmallPlaces.completionEventCount ==
+                smallPlacesConfig.CompletionEventCount)
+            {
+                AudioManager.Instance.PlayAudio("ui_jinduwancheng");
+            }
         }
 
         public void UpdateDaoYouCoun()
@@ -163,25 +172,21 @@ namespace Fort23.Mono
                 {
                     PlayerGuideManager.Instance.NextGuide();
                 }
-                
-              
+
 
                 AccountFileInfo.EventList eventList = AccountFileInfo.Instance.playerData.eventList.FirstOrDefault(e =>
                     e.guid == AccountFileInfo.Instance.playerData.CurrentZuiZhongEventListId);
-                
+
                 EventConfig eventConfig = ConfigComponent.Instance.Get<EventConfig>(eventList.eventID);
                 if (eventConfig.EventTriggerType == 4)
                 {
-                   
                     if (eventList.isCompleted1)
                     {
                         EventSystemManager.Instance.CompleteEvent(eventList);
                         return;
                     }
-                  
-            
                 }
-                
+
                 if (eventList != null)
                 {
                     EventSystemManager.Instance.CancelEvent();