1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Assets.MyGame.Scripts.Net;
|
||||
using Assets.MyGame.Scripts.Net;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections;
|
||||
@@ -54,7 +54,7 @@ public class ChineseChessMainPanel : GameMainPanel_Base
|
||||
img_Title_Top.gameObject.SetActive(true);
|
||||
foreach (var item in chessGameRoom.users)
|
||||
{
|
||||
if (item.userId == GameManager.Instance.user.id)
|
||||
if (item.userId == GameManager.Instance.user.BaseInfo.number)
|
||||
{
|
||||
if (item.type == 2)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ public class ChineseChessMainPanel : GameMainPanel_Base
|
||||
{
|
||||
foreach (var item in chessGameRoom.users)
|
||||
{
|
||||
if (item.userId == GameManager.Instance.user.id)
|
||||
if (item.userId == GameManager.Instance.user.BaseInfo.number)
|
||||
{
|
||||
tmp_Name_Bottom.text = item.userId;
|
||||
tmp_CoinCount_Bottom.text = "金币:" + item.gold.ToString();
|
||||
@@ -113,7 +113,7 @@ public class ChineseChessMainPanel : GameMainPanel_Base
|
||||
}
|
||||
public void IsShowHint(string id,int type)
|
||||
{
|
||||
if (GameManager.Instance.user.id!=id)
|
||||
if (GameManager.Instance.user.BaseInfo.number!=id)
|
||||
{
|
||||
subUIManager.ShowAsync(UIPanel.ZGXQHint, new HintData
|
||||
{
|
||||
@@ -130,12 +130,12 @@ public class ChineseChessMainPanel : GameMainPanel_Base
|
||||
btn_RenShu.onClick.RemoveAllListeners();
|
||||
btn_QiuHe.onClick.AddListener(() =>
|
||||
{
|
||||
WebSocketSendList.GameOperationChineseChess(roomData.roomId,1,GameManager.Instance.user.id);
|
||||
WebSocketSendList.GameOperationChineseChess(roomData.roomId,1,GameManager.Instance.user.BaseInfo.number);
|
||||
|
||||
});
|
||||
btn_RenShu.onClick.AddListener(() =>
|
||||
{
|
||||
//WebSocketSendList.GameOperationChineseChess(roomData.roomId, 2, GameManager.Instance.user.id);
|
||||
//WebSocketSendList.GameOperationChineseChess(roomData.roomId, 2, GameManager.Instance.user.BaseInfo.number);
|
||||
|
||||
subUIManager.ShowAsync(UIPanel.ZGXQHint, new HintData
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ public class UIChineseChessCreateRoom : SubUIBase
|
||||
gold = 1000,
|
||||
password = tMPInput_Password.text,
|
||||
roomId = v.roomId,
|
||||
userId = GameManager.Instance.user.id
|
||||
userId = GameManager.Instance.user.BaseInfo.number
|
||||
});
|
||||
}
|
||||
else
|
||||
|
||||
@@ -45,7 +45,7 @@ public class UIChineseChessDefeated : SubUIBase
|
||||
coinCountMinus.text = "-" + roomData.gold;
|
||||
foreach (var item in roomData.users)
|
||||
{
|
||||
if (item.userId == GameManager.Instance.user.id)
|
||||
if (item.userId == GameManager.Instance.user.BaseInfo.number)
|
||||
{
|
||||
//--top
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class UIChineseChessHe : SubUIBase
|
||||
ChineseChessGameClassList.ChessGameRoom roomData = ((ChineseChessMainPanel)uIManager.parentUIBase).roomData;
|
||||
foreach (var item in roomData.users)
|
||||
{
|
||||
if (item.userId == GameManager.Instance.user.id)
|
||||
if (item.userId == GameManager.Instance.user.BaseInfo.number)
|
||||
{
|
||||
//--top
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
@@ -20,9 +20,9 @@ public class UIChineseChessHint : SubUIBase
|
||||
{
|
||||
foreach (var item in v.roomData.users)
|
||||
{
|
||||
if (item.userId!=GameManager.Instance.user.id)
|
||||
if (item.userId!=GameManager.Instance.user.BaseInfo.number)
|
||||
{
|
||||
tmp_msg.text = $"<color=red>{item.userName}</color> 向您发起了求和";
|
||||
tmp_msg.text = $"<color=red>{item.userId}</color> 向您发起了求和";
|
||||
targetID=item.userId;
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public class UIChineseChessHint : SubUIBase
|
||||
{
|
||||
foreach (var item in v.roomData.users)
|
||||
{
|
||||
if (item.userId != GameManager.Instance.user.id)
|
||||
if (item.userId != GameManager.Instance.user.BaseInfo.number)
|
||||
{
|
||||
tmp_msg.text = $"是否确认认输";
|
||||
targetID = item.userId;
|
||||
@@ -41,7 +41,7 @@ public class UIChineseChessHint : SubUIBase
|
||||
}
|
||||
TongYi.onClick.AddListener(() =>
|
||||
{
|
||||
//WebSocketSendList.GameOperationChineseChess(v.roomData.roomId, 2, GameManager.Instance.user.id);
|
||||
//WebSocketSendList.GameOperationChineseChess(v.roomData.roomId, 2, GameManager.Instance.user.BaseInfo.number);
|
||||
if (v.hintType == 1)
|
||||
{
|
||||
//WebSocketSendList.EndGameChineseChess(v.roomData.roomId, targetID);
|
||||
|
||||
@@ -28,7 +28,7 @@ public class UIChineseChessJoinRoom : SubUIBase
|
||||
{
|
||||
if (tMPInput_Password.text.Length == 6)
|
||||
{
|
||||
WebSocketSendList.JoinGameChineseChess(v.roomId, tMPInput_Password.text, GameManager.Instance.user.id);
|
||||
WebSocketSendList.JoinGameChineseChess(v.roomId, tMPInput_Password.text, GameManager.Instance.user.BaseInfo.number);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ public class UIChineseChessRoomExplain : SubUIBase
|
||||
consent.onClick.RemoveAllListeners();
|
||||
consent.onClick.AddListener(() =>
|
||||
{
|
||||
WebSocketSendList.GameReadyChineseChess(v.roomId,GameManager.Instance.user.id);
|
||||
WebSocketSendList.GameReadyChineseChess(v.roomId,GameManager.Instance.user.BaseInfo.number);
|
||||
uIManager.Close(UIPanel.ZGXQGameExplain);
|
||||
});
|
||||
btn_Close.onClick.RemoveAllListeners();
|
||||
@@ -39,7 +39,7 @@ public class UIChineseChessRoomExplain : SubUIBase
|
||||
{
|
||||
uIManager.CloseAll();
|
||||
|
||||
WebSocketSendList.ExitRoomChineseChess(v.roomId, GameManager.Instance.user.id);
|
||||
WebSocketSendList.ExitRoomChineseChess(v.roomId, GameManager.Instance.user.BaseInfo.number);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class UIChineseChessSetCoin : SubUIBase
|
||||
btn_Enter.onClick.RemoveAllListeners();
|
||||
btn_Enter.onClick.AddListener(() =>
|
||||
{
|
||||
WebSocketSendList.SelectGlodChineseChess(v.roomId,Convert.ToInt32( tmpInput_Coin.text)<100?100: Convert.ToInt32(tmpInput_Coin.text),GameManager.Instance.user.id);
|
||||
WebSocketSendList.SelectGlodChineseChess(v.roomId,Convert.ToInt32( tmpInput_Coin.text)<100?100: Convert.ToInt32(tmpInput_Coin.text),GameManager.Instance.user.BaseInfo.number);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class UIChineseChessWin : SubUIBase
|
||||
coinCountMinus.text = "-" + roomData.gold;
|
||||
foreach (var item in roomData.users)
|
||||
{
|
||||
if (item.userId == GameManager.Instance.user.id)
|
||||
if (item.userId == GameManager.Instance.user.BaseInfo.number)
|
||||
{
|
||||
//--top
|
||||
|
||||
|
||||
Reference in New Issue
Block a user