Browse Source

提交。。

xyh2000 1 month ago
parent
commit
e547a42883

+ 8 - 8
Unity/Assets/Bundles/UI/UIStartFightRoom.prefab

@@ -27887,14 +27887,6 @@ MonoBehaviour:
     gameObject: {fileID: 8041415629072857608}
   - key: shakeDiceImage
     gameObject: {fileID: 582536803192665448}
-  - key: dongTxt
-    gameObject: {fileID: 0}
-  - key: nanTxt
-    gameObject: {fileID: 0}
-  - key: xiTxt
-    gameObject: {fileID: 0}
-  - key: beiTxt
-    gameObject: {fileID: 0}
   - key: playName2
     gameObject: {fileID: 4497255810669556251}
   - key: playName3
@@ -27911,6 +27903,14 @@ MonoBehaviour:
     gameObject: {fileID: 4132406644446925280}
   - key: haveBeenOutContent4
     gameObject: {fileID: 6803103047987801367}
+  - key: shakeDiceImage1
+    gameObject: {fileID: 582536803192665448}
+  - key: shakeDiceImage2
+    gameObject: {fileID: 3123140962337808983}
+  - key: shakeDiceImage3
+    gameObject: {fileID: 4318110380293681554}
+  - key: shakeDiceImage4
+    gameObject: {fileID: 5464416404178112236}
 --- !u!1 &8798292298967176735
 GameObject:
   m_ObjectHideFlags: 0

+ 23 - 34
Unity/Assets/Scripts/Codes/HotfixView/Client/Demo/UI/UIStartFightRoom/UIStartFightRoomComponentSystem.cs

@@ -74,7 +74,6 @@ namespace ET.Client
 			{
                 ReferenceCollector rc = self.GetParent<UI>().GameObject.GetComponent<ReferenceCollector>();
                 //头像部分
-                self.houseIcon = rc.Get<GameObject>("houseIcon");
                 self.houseIdTxt = rc.Get<GameObject>("houseIdTxt");
                 self.gameNumTxt = rc.Get<GameObject>("gameNumTxt");
                 self.curResidueTxt = rc.Get<GameObject>("curResidueTxt");
@@ -125,13 +124,13 @@ namespace ET.Client
                 self.listFaceContent = rc.Get<GameObject>("listFaceContent");
                 self.gridFaceItem = rc.Get<GameObject>("gridFaceItem");
 
-                self.shakeDiceImage = rc.Get<GameObject>("shakeDiceImage").GetComponent<UnityEngine.UI.Image>();
+                self.shakeDiceImage1 = rc.Get<GameObject>("shakeDiceImage1");
+                self.shakeDiceImage2 = rc.Get<GameObject>("shakeDiceImage2");
+                self.shakeDiceImage3 = rc.Get<GameObject>("shakeDiceImage3");
+                self.shakeDiceImage4 = rc.Get<GameObject>("shakeDiceImage4");
                 self.timeCountTxt = rc.Get<GameObject>("timeCountTxt").GetComponent<UnityEngine.UI.Text>();
 
-                self.dongTxt = rc.Get<GameObject>("dongTxt").GetComponent<UnityEngine.UI.Text>();
-                self.nanTxt = rc.Get<GameObject>("nanTxt").GetComponent<UnityEngine.UI.Text>();
-                self.xiTxt = rc.Get<GameObject>("xiTxt").GetComponent<UnityEngine.UI.Text>();
-                self.beiTxt = rc.Get<GameObject>("beiTxt").GetComponent<UnityEngine.UI.Text>();
+              
 
                 //玩
                 self.readyBtn = rc.Get<GameObject>("readyBtn");
@@ -238,7 +237,7 @@ namespace ET.Client
                                 }
                             }
                         }
-                        RefreshOrientation(startFightRoomInfo.roomInfo.MyInfo.pos, startFightRoomComponentUI);
+                        RefreshOrientation(startFightRoomInfo.roomInfo.OpPos, startFightRoomComponentUI);
                         break;
                     }
                 case EventType.ReadyPush:
@@ -1103,47 +1102,37 @@ namespace ET.Client
             }
             startFightRoomComponentUI.startTimer = TimerComponent.Instance.NewRepeatedTimer(ConstValue.fightTimeRefreshTime / 2 + 100, TimerInvokeType.startFightTimeCount, startFightRoomComponentUI);
             //处理当前操作玩家的状态显示
-            RefreshCenterOperationState(startFightRoomInfo.roomInfo.OpPos, startFightRoomComponentUI);
+            //RefreshCenterOperationState(startFightRoomInfo.roomInfo.OpPos, startFightRoomComponentUI);
         }
 
         //刷新中间表示当前操作玩家
         public static async void RefreshCenterOperationState(int OpPos, UIStartFightRoomComponent uIStartFightRoomComponent)
         {
-            await ResourcesComponentHelper.Instance.LoadSprite(GameUtil.Instance.GetSceneComponent(), "fightatlas");
-            string abName = string.Concat("TimePoint",OpPos);
-            Sprite sprite = ResourcesComponentHelper.Instance.GetSprite("fightatlas", abName);
-            uIStartFightRoomComponent.shakeDiceImage.sprite = sprite;
+            //await ResourcesComponentHelper.Instance.LoadSprite(GameUtil.Instance.GetSceneComponent(), "fightatlas");
+            //string abName = string.Concat("TimePoint",OpPos);
+            //Sprite sprite = ResourcesComponentHelper.Instance.GetSprite("fightatlas", abName);
+            //uIStartFightRoomComponent.shakeDiceImage.sprite = sprite;
         }
 
-        public static void RefreshOrientation(int myPos,UIStartFightRoomComponent uIStartFightRoomComponent)
+        public static void RefreshOrientation(int opPos,UIStartFightRoomComponent uIStartFightRoomComponent)
         {
-            switch (myPos)
+            uIStartFightRoomComponent.shakeDiceImage1.SetActive(false);
+            uIStartFightRoomComponent.shakeDiceImage2.SetActive(false);
+            uIStartFightRoomComponent.shakeDiceImage3.SetActive(false);
+            uIStartFightRoomComponent.shakeDiceImage4.SetActive(false);
+            switch (opPos)
             {
                 case 0:
-                    {
-                        uIStartFightRoomComponent.dongTxt.text = uIStartFightRoomComponent.orientationList[0];
-                        uIStartFightRoomComponent.nanTxt.text = uIStartFightRoomComponent.orientationList[1];
-                        uIStartFightRoomComponent.xiTxt.text = uIStartFightRoomComponent.orientationList[2];
-                        uIStartFightRoomComponent.beiTxt.text = uIStartFightRoomComponent.orientationList[3];
-                        break;
-                    }
+                    uIStartFightRoomComponent.shakeDiceImage1.SetActive(true);
+                    break;
                 case 1:
-                    uIStartFightRoomComponent.dongTxt.text = uIStartFightRoomComponent.orientationList[1];
-                    uIStartFightRoomComponent.nanTxt.text = uIStartFightRoomComponent.orientationList[2];
-                    uIStartFightRoomComponent.xiTxt.text = uIStartFightRoomComponent.orientationList[3];
-                    uIStartFightRoomComponent.beiTxt.text = uIStartFightRoomComponent.orientationList[0];
+                    uIStartFightRoomComponent.shakeDiceImage2.SetActive(true);
                     break;
                 case 2:
-                    uIStartFightRoomComponent.dongTxt.text = uIStartFightRoomComponent.orientationList[2];
-                    uIStartFightRoomComponent.nanTxt.text = uIStartFightRoomComponent.orientationList[3];
-                    uIStartFightRoomComponent.xiTxt.text = uIStartFightRoomComponent.orientationList[0];
-                    uIStartFightRoomComponent.beiTxt.text = uIStartFightRoomComponent.orientationList[1];
+                    uIStartFightRoomComponent.shakeDiceImage3.SetActive(true);
                     break;
                 case 3:
-                    uIStartFightRoomComponent.dongTxt.text = uIStartFightRoomComponent.orientationList[3];
-                    uIStartFightRoomComponent.nanTxt.text = uIStartFightRoomComponent.orientationList[0];
-                    uIStartFightRoomComponent.xiTxt.text = uIStartFightRoomComponent.orientationList[1];
-                    uIStartFightRoomComponent.beiTxt.text = uIStartFightRoomComponent.orientationList[2];
+                    uIStartFightRoomComponent.shakeDiceImage4.SetActive(true);
                     break;
             }
             
@@ -1221,7 +1210,7 @@ namespace ET.Client
                         startFightRoomComponentUI.timeCountTxt.text = "";
                         TimerComponent.Instance?.Remove(ref startFightRoomComponentUI.startTimer);
                     }
-                    startFightRoomComponentUI.shakeDiceImage.sprite = null;
+                    //startFightRoomComponentUI.shakeDiceImage.sprite = null;
                     //之后走推送
                 }
             }

+ 4 - 7
Unity/Assets/Scripts/Codes/ModelView/Client/Demo/UI/UIStartFightRoom/UIStartFightRoomComponent.cs

@@ -27,7 +27,6 @@ namespace ET.Client
     [ComponentOf(typeof(UI))]
 	public class UIStartFightRoomComponent : Entity, IAwake, IDestroy
     {
-		public GameObject houseIcon;
 		public GameObject houseIdTxt;
 		public GameObject gameNumTxt;
 		public GameObject curResidueTxt;
@@ -68,14 +67,12 @@ namespace ET.Client
         //战斗聊天弹框
         public List<GameObject> playChatObjList = new List<GameObject>();
 
-        public Image shakeDiceImage;
+        public GameObject shakeDiceImage1;
+        public GameObject shakeDiceImage2;
+        public GameObject shakeDiceImage3;
+        public GameObject shakeDiceImage4;
         public Text timeCountTxt;
 
-        public Text dongTxt;
-        public Text nanTxt;
-        public Text xiTxt;
-        public Text beiTxt;
-
         //操作
         public GameObject operatorObj;
         public List<GameObject> operatorObj_btn = new List<GameObject>();