Browse Source

吃碰胡杠 声音提交。

xyh1985 11 tháng trước cách đây
mục cha
commit
2afef94f0f

+ 13 - 1
Unity/Assets/Scripts/Codes/HotfixView/Client/Demo/UI/UIStartFightRoom/UIStartFightRoomComponentSystem.cs

@@ -584,6 +584,8 @@ namespace ET.Client
 
         public static async void OnOperatorBtn(this UIStartFightRoomComponent self, int operatorIndex)
         {
+            var startFightRoomInfo = GameUtil.Instance.GetSceneComponent().GetComponent<StartFightRoomComponment>().GetStartFightRoomInfo();
+            int sexType = startFightRoomInfo.roomInfo.MyInfo.sex;
             switch (operatorIndex)
             {
                 case 1:
@@ -615,7 +617,8 @@ namespace ET.Client
                                 await CommonUtil.Instance.OpenCommonServerMsgPanel($"操作失败,errCode={errorCode},operatorType={operatorIndex}");
                                 return;
                             }
-                            await SoundManager.Instance.PlaySound(string.Concat(soundStrType, disCard));
+                            string soundStrType = sexType == 0 ? GameSetting.Instance.disCardBoySoundName : GameSetting.Instance.disCardGirlSoundName;
+                            await SoundManager.Instance.PlaySound(string.Concat(soundStrType, "chi"));
                         });
                         break;
                     }
@@ -668,6 +671,13 @@ namespace ET.Client
                                 await CommonUtil.Instance.OpenCommonServerMsgPanel($"操作失败,errCode={errorCode},operatorType={operatorIndex}");
                                 return;
                             }
+                            
+                            if (operatorIndex == 2 || operatorIndex == 3)
+                            {
+                                string soundStrType = sexType == 0 ? GameSetting.Instance.disCardBoySoundName : GameSetting.Instance.disCardGirlSoundName;
+                                string destSoundStr = operatorIndex == 2? "peng": "hu";
+                                await SoundManager.Instance.PlaySound(string.Concat(soundStrType, destSoundStr));
+                            }
                         });
                         break;
                     }
@@ -700,6 +710,8 @@ namespace ET.Client
                                 await CommonUtil.Instance.OpenCommonServerMsgPanel($"操作失败,errCode={errorCode},operatorType={operatorIndex}");
                                 return;
                             }
+                            string soundStrType = sexType == 0 ? GameSetting.Instance.disCardBoySoundName : GameSetting.Instance.disCardGirlSoundName;
+                            await SoundManager.Instance.PlaySound(string.Concat(soundStrType, "gang"));
                         });
                         break;
                     }