xyh2000 7 months ago
parent
commit
763083e721

+ 22 - 0
Unity/Assets/Scripts/Codes/HotfixView/Client/Demo/UI/UIStartFightRoom/UIStartFightRoomComponentSystem.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Threading.Tasks;
 using UnityEngine;
@@ -291,6 +292,27 @@ namespace ET.Client
                     {
                         //正式开始 发牌
                         var startFightRoomComponentUI = ui.GetComponent<UIStartFightRoomComponent>();
+                        var myCardInfo = startFightRoomInfo.roomInfo.MyInfo;
+                        var roleInfo = scene.GetComponent<RoleInfoComponment>().GetRoleInfo();
+                        if (myCardInfo != null && myCardInfo.cardInfo != null && myCardInfo.cardInfo.Acts.Count > 0 && roleInfo.roleId == myCardInfo.id)
+                        {
+                            //处理操作按钮
+                            for (int i = 0; i < startFightRoomComponentUI.operatorObj_btn.Count; i++)
+                            {
+                                startFightRoomComponentUI.operatorObj_btn[i].SetActive(false);
+                            }
+                            for (int i = 0; i < myCardInfo.cardInfo.Acts.Count; i++)
+                            {
+                                if (myCardInfo.cardInfo.Acts[i] == 1)
+                                {
+                                    if (!startFightRoomComponentUI.operatorObj.activeInHierarchy)
+                                    {
+                                        startFightRoomComponentUI.operatorObj.SetActive(true);
+                                    }
+                                    startFightRoomComponentUI.operatorObj_btn[i].SetActive(true);
+                                }
+                            }
+                        }
                         RefreshPlayCardList(scene, startFightRoomInfo, startFightRoomComponentUI);
                         break;
                     }