zhangyuqian 1 жил өмнө
parent
commit
59635f5e3b

+ 4 - 1
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxVideoView.cs

@@ -18,11 +18,11 @@ namespace GFGGame
         private RawImage imgVideo;
         private Button BtnSkipVertical;
         private VideoPlayer videoPlayer;
+        private AudioSource audioSource;
         private List<ItemData> _rewardList;
 
         public void Show(List<ItemData> _reward = null)
         {
-            MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath("luckyboxMp3", "mp3"));
             FairyGUI.GRoot.inst.touchable = false;
             string path = ResPathUtil.GetUUIPrefabPath("UILuckyBox");
             handle = YooAssets.LoadAssetSync<GameObject>(path);
@@ -47,6 +47,9 @@ namespace GFGGame
             videoPlayer.url = videoHandle.GetRawFilePath();
             videoPlayer.Play();
 
+            audioSource = _ui.transform.GetComponent<AudioSource>();
+            audioSource.Play();
+
             _rewardList = _reward;
         }
 

+ 97 - 0
GameClient/Assets/ResIn/UUI/UILuckyBox.prefab

@@ -12,6 +12,7 @@ GameObject:
   - component: {fileID: 5558493903024588817}
   - component: {fileID: 3027397433677819976}
   - component: {fileID: 7362622180705135904}
+  - component: {fileID: 5920855872825401642}
   m_Layer: 5
   m_Name: UILuckyBox
   m_TagString: Untagged
@@ -102,6 +103,102 @@ MonoBehaviour:
   m_BlockingMask:
     serializedVersion: 2
     m_Bits: 4294967295
+--- !u!82 &5920855872825401642
+AudioSource:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3226370377293259953}
+  m_Enabled: 1
+  serializedVersion: 4
+  OutputAudioMixerGroup: {fileID: 0}
+  m_audioClip: {fileID: 8300000, guid: 7d689ed887989f44881d12459c9267e7, type: 3}
+  m_PlayOnAwake: 1
+  m_Volume: 1
+  m_Pitch: 1
+  Loop: 0
+  Mute: 0
+  Spatialize: 0
+  SpatializePostEffects: 0
+  Priority: 128
+  DopplerLevel: 1
+  MinDistance: 1
+  MaxDistance: 500
+  Pan2D: 0
+  rolloffMode: 0
+  BypassEffects: 0
+  BypassListenerEffects: 0
+  BypassReverbZones: 0
+  rolloffCustomCurve:
+    serializedVersion: 2
+    m_Curve:
+    - serializedVersion: 3
+      time: 0
+      value: 1
+      inSlope: 0
+      outSlope: 0
+      tangentMode: 0
+      weightedMode: 0
+      inWeight: 0.33333334
+      outWeight: 0.33333334
+    - serializedVersion: 3
+      time: 1
+      value: 0
+      inSlope: 0
+      outSlope: 0
+      tangentMode: 0
+      weightedMode: 0
+      inWeight: 0.33333334
+      outWeight: 0.33333334
+    m_PreInfinity: 2
+    m_PostInfinity: 2
+    m_RotationOrder: 4
+  panLevelCustomCurve:
+    serializedVersion: 2
+    m_Curve:
+    - serializedVersion: 3
+      time: 0
+      value: 0
+      inSlope: 0
+      outSlope: 0
+      tangentMode: 0
+      weightedMode: 0
+      inWeight: 0.33333334
+      outWeight: 0.33333334
+    m_PreInfinity: 2
+    m_PostInfinity: 2
+    m_RotationOrder: 4
+  spreadCustomCurve:
+    serializedVersion: 2
+    m_Curve:
+    - serializedVersion: 3
+      time: 0
+      value: 0
+      inSlope: 0
+      outSlope: 0
+      tangentMode: 0
+      weightedMode: 0
+      inWeight: 0.33333334
+      outWeight: 0.33333334
+    m_PreInfinity: 2
+    m_PostInfinity: 2
+    m_RotationOrder: 4
+  reverbZoneMixCustomCurve:
+    serializedVersion: 2
+    m_Curve:
+    - serializedVersion: 3
+      time: 0
+      value: 1
+      inSlope: 0
+      outSlope: 0
+      tangentMode: 0
+      weightedMode: 0
+      inWeight: 0.33333334
+      outWeight: 0.33333334
+    m_PreInfinity: 2
+    m_PostInfinity: 2
+    m_RotationOrder: 4
 --- !u!1 &5639216484651693872
 GameObject:
   m_ObjectHideFlags: 0