|
@@ -127,8 +127,13 @@ namespace ET.Client
|
|
|
self.shakeDiceImage = rc.Get<GameObject>("shakeDiceImage").GetComponent<UnityEngine.UI.Image>();
|
|
|
self.timeCountTxt = rc.Get<GameObject>("timeCountTxt").GetComponent<UnityEngine.UI.Text>();
|
|
|
|
|
|
- //玩
|
|
|
- self.readyBtn = rc.Get<GameObject>("readyBtn");
|
|
|
+ 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");
|
|
|
self.readyBtn.GetComponent<Button>().onClick.AddListener(() => { self.OnReadyAndInviteBtn(0); });
|
|
|
self.inviteBtn = rc.Get<GameObject>("inviteBtn");
|
|
|
self.inviteBtn.GetComponent<Button>().onClick.AddListener(() => { self.OnReadyAndInviteBtn(1); });
|
|
@@ -145,10 +150,12 @@ namespace ET.Client
|
|
|
var playerObj = rc.Get<GameObject>("player" + i);
|
|
|
var playerIconObj = rc.Get<GameObject>("playerIcon" + i);
|
|
|
var readyImage = rc.Get<GameObject>("readyImage" + i);
|
|
|
+ var playName = rc.Get<GameObject>("playName" + i).GetComponent<Text>();
|
|
|
var playerIconImage = playerIconObj.GetComponent<UnityEngine.UI.Image>();
|
|
|
uIStartFightRoomPlayerCom.playerObj = playerObj;
|
|
|
uIStartFightRoomPlayerCom.readyImage = readyImage;
|
|
|
uIStartFightRoomPlayerCom.playerIcon = playerIconImage;
|
|
|
+ uIStartFightRoomPlayerCom.playName = playName;
|
|
|
|
|
|
var fightCardContentNode = rc.Get<GameObject>("fightCardContent" + i);
|
|
|
uIStartFightRoomPlayerCom.fightCardNode = fightCardContentNode;
|
|
@@ -217,11 +224,13 @@ namespace ET.Client
|
|
|
if (i >= startFightRoomComponentUI.uIStartFightRoomPlayerComs.Count - 1)
|
|
|
{
|
|
|
startFightRoomComponentUI.uIStartFightRoomPlayerComs[i + 1].playerObj.SetActive(false);
|
|
|
+ startFightRoomComponentUI.uIStartFightRoomPlayerComs[i + 1].playName.text = "";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
startFightRoomComponentUI.uIStartFightRoomPlayerComs[i + 1].playerObj.SetActive(true);
|
|
|
startFightRoomComponentUI.uIStartFightRoomPlayerComs[i + 1].readyImage.SetActive(false);
|
|
|
+ startFightRoomComponentUI.uIStartFightRoomPlayerComs[i + 1].playName.text = startFightRoomInfo.roomInfo.OtherInfo[i].name;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -299,6 +308,7 @@ namespace ET.Client
|
|
|
RefreshPlayCardList(1, new List<PlayerInfo>() { myCardInfo }, startFightRoomInfo.roomInfo, startFightRoomComponentUI);
|
|
|
}
|
|
|
#endregion
|
|
|
+ RefreshOrientation(myCardInfo.pos, startFightRoomComponentUI);
|
|
|
break;
|
|
|
}
|
|
|
case EventType.GameDisCardPush:
|
|
@@ -757,10 +767,10 @@ namespace ET.Client
|
|
|
icon.sprite = sprite;
|
|
|
var btn = icon.gameObject.GetComponent<Button>();
|
|
|
btn.onClick.RemoveAllListeners();
|
|
|
- btn.onClick.AddListener(() =>
|
|
|
- {
|
|
|
- Log.Error("card Click...");
|
|
|
- });
|
|
|
+ //btn.onClick.AddListener(() =>
|
|
|
+ //{
|
|
|
+ // Log.Error("card Click...");
|
|
|
+ //});
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -806,6 +816,7 @@ namespace ET.Client
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ startFightRoomComponentUI.uIStartFightRoomPlayerComs[i + 1].playName.text = otherPlayInfo.name;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -836,9 +847,9 @@ namespace ET.Client
|
|
|
|
|
|
startFightCardItem.Init(uifightItem.GetComponentInChildren<UnityEngine.UI.Image>(), value,(val)=>
|
|
|
{
|
|
|
- if (myCardInfo.state != roomInfo.OpPos || myCardInfo.id != roomInfo.OpId)
|
|
|
+ if (myCardInfo.pos != roomInfo.OpPos || myCardInfo.id != roomInfo.OpId)
|
|
|
{
|
|
|
- Log.Error("不是自己回合");
|
|
|
+ Log.Error($"@@@ 不是自己回合 state: {myCardInfo.state} ===>opPos: {roomInfo.OpPos} ===> ID:{myCardInfo.id} ===> opId: {roomInfo.OpId}");
|
|
|
return;
|
|
|
}
|
|
|
DisCardRequest(val, startFightRoomComponentUI).Coroutine();
|
|
@@ -855,9 +866,9 @@ namespace ET.Client
|
|
|
|
|
|
startFightCardItem.Init(uifightItem.GetComponentInChildren<UnityEngine.UI.Image>(), value, (val) =>
|
|
|
{
|
|
|
- if (myCardInfo.state != roomInfo.OpPos || myCardInfo.id != roomInfo.OpId)
|
|
|
+ if (myCardInfo.pos != roomInfo.OpPos || myCardInfo.id != roomInfo.OpId)
|
|
|
{
|
|
|
- Log.Error("不是自己回合");
|
|
|
+ Log.Error($"@@@不是自己回合 state: {myCardInfo.state} ===>opPos: {roomInfo.OpPos} ===> ID:{myCardInfo.id} ===> opId: {roomInfo.OpId}");
|
|
|
return;
|
|
|
}
|
|
|
DisCardRequest(val, startFightRoomComponentUI).Coroutine();
|
|
@@ -894,6 +905,8 @@ namespace ET.Client
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ startFightRoomComponentUI.uIStartFightRoomPlayerComs[0].playName.text = myCardInfo.name;
|
|
|
}
|
|
|
|
|
|
//处理每个回合倒计时
|
|
@@ -918,6 +931,40 @@ namespace ET.Client
|
|
|
uIStartFightRoomComponent.shakeDiceImage.sprite = sprite;
|
|
|
}
|
|
|
|
|
|
+ public static void RefreshOrientation(int myPos,UIStartFightRoomComponent uIStartFightRoomComponent)
|
|
|
+ {
|
|
|
+ switch (myPos)
|
|
|
+ {
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ 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];
|
|
|
+ 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];
|
|
|
+ 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];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
#region 请求相关
|
|
|
//操作,chi p hu
|
|
|
public static async ETTask OperationCardRequest(int operationType,int firstCard)
|