|
@@ -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;
|
|
|
//之后走推送
|
|
|
}
|
|
|
}
|