2 Commits ec38bd0e86 ... 6602b1eb27

Author SHA1 Message Date
  xyh2000 6602b1eb27 Merge branch 'master' of http://115.29.205.206/kimoji/ET 1 month ago
  xyh2000 a43cbda375 可能导致声音播放两次问题。 1 month ago

+ 0 - 1
Unity/Assets/Scripts/Codes/HotfixView/Client/Demo/UI/UIStartFightRoom/StartFightCardItem.cs

@@ -17,7 +17,6 @@ namespace ET.Client
         { 
             this.icon = icon;
             this.val = val;
-            Log.Error("@@@@@  val:   " + this.val);
             this.cb = cb;
             var sprite = await GameObjectPool.Instance.AcquireSprite(string.Concat(GameSetting.Instance.selfPlayCardCenterSpiteName, this.val));
             this.icon.sprite = sprite;

+ 9 - 6
Unity/Assets/Scripts/Codes/HotfixView/Client/Demo/UI/UIStartFightRoom/UIStartFightRoomComponentSystem.cs

@@ -191,15 +191,17 @@ namespace ET.Client
                     });
                     self.operatorObj_btn.Add(operatorObjBtn);
                 }
+
+                self.RepeatedTimer = TimerComponent.Instance.NewRepeatedTimer(ConstValue.fightTimeRefreshTime / 1 + 100, TimerInvokeType.fightTimeShow, self);
+                CommonBridge.Instance.dispathPush += DispathPush;
+
                 self.Init();
             }
         }
 
         private static async void Init(this UIStartFightRoomComponent self)
         {
-            self.RepeatedTimer = TimerComponent.Instance.NewRepeatedTimer(ConstValue.fightTimeRefreshTime / 1 + 100, TimerInvokeType.fightTimeShow, self);
             var startFightRoomInfo = self.ClientScene().GetComponent<StartFightRoomComponment>().GetStartFightRoomInfo();
-            CommonBridge.Instance.dispathPush += DispathPush;
             self.readyBtn.SetActive(true);
             self.inviteBtn.SetActive(true);
             self.houseIdTxt.GetComponent<Text>().text = startFightRoomInfo.roomInfo.RoomId.ToString();
@@ -322,6 +324,7 @@ namespace ET.Client
 
                         if (type is EventType.GameOperationPush)
                         {
+                            Log.Error("@@@@ 操作类型 声音播放");
                             PlayOperatorSound(startFightRoomInfo);
                         }
                         break;
@@ -373,9 +376,6 @@ namespace ET.Client
                             //记录当前出的牌
                             GameUtil.Instance.curCardVal = startFightRoomInfo.roomInfo.CurDisCard;
 
-                            int sexType = startFightRoomInfo.roomInfo.CurDisCardSex;
-                            string soundStrType = sexType == 0 ? GameSetting.Instance.disCardBoySoundName : GameSetting.Instance.disCardGirlSoundName;
-                            await SoundManager.Instance.PlaySound(string.Concat(soundStrType, startFightRoomInfo.roomInfo.CurDisCard));
                             Log.Error("当前出的牌: " + GameUtil.Instance.curCardVal);
                         }
 
@@ -391,6 +391,10 @@ namespace ET.Client
                                 startFightRoomComponentUI.timeCountTxt.text = "";
                             }
                         }
+
+                        int sexType = startFightRoomInfo.roomInfo.CurDisCardSex;
+                        string soundStrType = sexType == 0 ? GameSetting.Instance.disCardBoySoundName : GameSetting.Instance.disCardGirlSoundName;
+                        await SoundManager.Instance.PlaySound(string.Concat(soundStrType, startFightRoomInfo.roomInfo.CurDisCard));
                         Log.Error("@@@@ 当前出牌: " + roomInfo.CurDisCard);
                         RefreshPlayCardList(scene, startFightRoomInfo, startFightRoomComponentUI);
                         //刷新剩余牌数量和局数
@@ -998,7 +1002,6 @@ namespace ET.Client
                 }
             }
             //处理每个回合倒计时
-            Log.Error("当前自己回合");
             startFightRoomComponentUI.startTimeCount = startFightRoomInfo.roomInfo.Time;
 
             //处理当前操作玩家的状态显示