|
@@ -318,6 +318,11 @@ namespace ET.Client
|
|
|
RefreshPlayCardList(scene, startFightRoomInfo, startFightRoomComponentUI);
|
|
|
|
|
|
RefreshCurentCardCount(startFightRoomComponentUI, startFightRoomInfo.roomInfo.CardNum, startFightRoomInfo.roomInfo.CurRound);
|
|
|
+
|
|
|
+ if (type is EventType.GameOperationPush)
|
|
|
+ {
|
|
|
+ PlayOperatorSound(startFightRoomInfo);
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
case EventType.GameDisCardPush:
|
|
@@ -366,6 +371,10 @@ 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);
|
|
|
}
|
|
|
|
|
@@ -655,8 +664,8 @@ namespace ET.Client
|
|
|
return;
|
|
|
}
|
|
|
GameUtil.Instance.curRequestCardVal = -1;
|
|
|
- string soundStrType = sexType == 0 ? GameSetting.Instance.disCardBoySoundName : GameSetting.Instance.disCardGirlSoundName;
|
|
|
- await SoundManager.Instance.PlaySound(string.Concat(soundStrType, "chi"));
|
|
|
+
|
|
|
+
|
|
|
self.operatorObj.SetActive(false);
|
|
|
});
|
|
|
break;
|
|
@@ -689,9 +698,9 @@ namespace ET.Client
|
|
|
GameUtil.Instance.curRequestCardVal = -1;
|
|
|
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;
|
|
@@ -715,8 +724,8 @@ namespace ET.Client
|
|
|
}
|
|
|
self.operatorObj.SetActive(false);
|
|
|
GameUtil.Instance.curRequestCardVal = -1;
|
|
|
- string soundStrType = sexType == 0 ? GameSetting.Instance.disCardBoySoundName : GameSetting.Instance.disCardGirlSoundName;
|
|
|
- await SoundManager.Instance.PlaySound(string.Concat(soundStrType, "gang"));
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
break;
|
|
|
}
|
|
@@ -756,6 +765,32 @@ namespace ET.Client
|
|
|
playInfo.cardInfo.RemainCards.Sort();
|
|
|
playInfo.cardInfo.RemainCards.Add(listItem);
|
|
|
Log.Error("@@@@@@### RemainCards: " + string.Join(",", playInfo.cardInfo.RemainCards) + " Count: " + playInfo.cardInfo.RemainCards.Count);
|
|
|
+
|
|
|
+
|
|
|
+ if (playInfo.cardInfo.ActInfo != null && playInfo.cardInfo.ActInfo.Count > 0)
|
|
|
+ {
|
|
|
+ for (int j = 0; j < playInfo.cardInfo.ActInfo.Count; j++)
|
|
|
+ {
|
|
|
+ var actInfo = playInfo.cardInfo.ActInfo[j];
|
|
|
+ ActInfoType actInfoType = (ActInfoType)actInfo.Type;
|
|
|
+ if (actInfoType == ActInfoType.DarkPole || actInfoType == ActInfoType.BackPole || actInfoType == ActInfoType.LightPole)
|
|
|
+ {
|
|
|
+ int loop = 1;
|
|
|
+ for (int u = 0; u < playInfo.cardInfo.RemainCards.Count; u++)
|
|
|
+ {
|
|
|
+ if (playInfo.cardInfo.RemainCards[u] == actInfo.Card)
|
|
|
+ {
|
|
|
+ loop++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (loop >= 3)
|
|
|
+ {
|
|
|
+ GameObjectPool.Instance.OperatoRarealySelCardList(0, actInfo.Card);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
CleanCardItemList(fightCardParentNode.transform, 0);
|
|
@@ -964,16 +999,53 @@ namespace ET.Client
|
|
|
|
|
|
Log.Error("当前自己回合");
|
|
|
startFightRoomComponentUI.startTimeCount = startFightRoomInfo.roomInfo.Time;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public static async void PlayOperatorSound(StartFightRoomInfo startFightRoomInfo)
|
|
|
+ {
|
|
|
+
|
|
|
+ var sexType = startFightRoomInfo.roomInfo.CurDisCardSex;
|
|
|
+ var operatorIndex = startFightRoomInfo.opType;
|
|
|
+ string soundStrType = sexType == 0 ? GameSetting.Instance.disCardBoySoundName : GameSetting.Instance.disCardGirlSoundName;
|
|
|
+ string destSoundStr = "";
|
|
|
+ switch (operatorIndex)
|
|
|
+ {
|
|
|
+ case 1:
|
|
|
+ {
|
|
|
+ destSoundStr = "chi";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 2:
|
|
|
+ {
|
|
|
+ destSoundStr = "peng";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 3:
|
|
|
+ {
|
|
|
+ destSoundStr = "gang";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 4:
|
|
|
+ {
|
|
|
+ destSoundStr = "hu";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 5:
|
|
|
+ {
|
|
|
+ destSoundStr = "guo";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (string.IsNullOrEmpty(destSoundStr))
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ await SoundManager.Instance.PlaySound(string.Concat(soundStrType, destSoundStr));
|
|
|
+ }
|
|
|
+
|
|
|
public static void RefreshCurentCardCount(UIStartFightRoomComponent startFightRoomComponentUI,int CardNum,int CurRound)
|
|
|
{
|
|
|
startFightRoomComponentUI.curResidueTxt.GetComponent<Text>().text = $"剩 {CardNum} 张";
|
|
@@ -1075,18 +1147,17 @@ namespace ET.Client
|
|
|
await CommonUtil.Instance.OpenCommonServerMsgPanel($"出牌{disCard} 出错...errCode={g2DisCard.Error}");
|
|
|
return;
|
|
|
}
|
|
|
- var startFightRoomInfo = GameUtil.Instance.GetSceneComponent().GetComponent<StartFightRoomComponment>().GetStartFightRoomInfo();
|
|
|
- int sexType = startFightRoomInfo.roomInfo.MyInfo.sex;
|
|
|
- string soundStrType = sexType == 0 ? GameSetting.Instance.disCardBoySoundName : GameSetting.Instance.disCardGirlSoundName;
|
|
|
- await SoundManager.Instance.PlaySound(string.Concat(soundStrType, disCard));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
if (startFightRoomComponentUI.startTimer > 0)
|
|
|
{
|
|
|
startFightRoomComponentUI.timeCountTxt.text = "";
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
catch (Exception e)
|
|
@@ -1131,6 +1202,7 @@ namespace ET.Client
|
|
|
StartFightCardItem startFightCardItem = child.gameObject.GetComponent<StartFightCardItem>();
|
|
|
if (startFightCardItem.val == cardVal)
|
|
|
{
|
|
|
+ Log.Error("@@@ gang: 抬起: " + startFightCardItem.val);
|
|
|
startFightCardItem.StandUp();
|
|
|
loopIndex++;
|
|
|
}
|
|
@@ -1151,6 +1223,7 @@ namespace ET.Client
|
|
|
StartFightCardItem startFightCardItem = child.gameObject.GetComponent<StartFightCardItem>();
|
|
|
if (startFightCardItem.val == cardVal)
|
|
|
{
|
|
|
+ Log.Error("@@@ peng: 抬起: " + cardVal);
|
|
|
startFightCardItem.StandUp();
|
|
|
loopIndex++;
|
|
|
}
|
|
@@ -1189,6 +1262,7 @@ namespace ET.Client
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
|
+ Log.Error("@@@ chi: 抬起: " + startFightCardItem.val);
|
|
|
startFightCardItem.StandUp();
|
|
|
tempCards.Add(startFightCardItem.val);
|
|
|
}
|