diff --git a/xiaofang/Assets/ProtoBuf/test.cs b/xiaofang/Assets/ProtoBuf/test.cs index 16149872..048318bc 100644 --- a/xiaofang/Assets/ProtoBuf/test.cs +++ b/xiaofang/Assets/ProtoBuf/test.cs @@ -233,10 +233,10 @@ public class test : MonoBehaviour //11.开始计时 - void RoomStartTime() + void RoomStartTime(string rooid) { JoinRoomRequest data = new JoinRoomRequest(); - data.RoomId = "168888"; + data.RoomId = rooid; WSMessage msg = new WSMessage(); msg.Module = "hall"; msg.ServiceName = "RoomStartTime"; @@ -644,7 +644,8 @@ public class test : MonoBehaviour byte[] joinByte = joinRoomResponse.Data.ToByteArray(); PlayerJoinResponse playerJoinResponse = ProtoBufffer.DeSerialize(joinByte); Debug.Log("玩家:" + playerJoinResponse.UserName + "加入房间:" + playerJoinResponse.RoomId.ToString()); - + GameObject.Find("Player").transform.position = new Vector3((float)playerJoinResponse.X, (float)playerJoinResponse.Y, (float)playerJoinResponse.Z); + Debug.Log("玩家位置"); break; diff --git a/xiaofang/Assets/Res/gsj/scripts/ReadRoom.cs b/xiaofang/Assets/Res/gsj/scripts/ReadRoom.cs index 917616dc..937e0e31 100644 --- a/xiaofang/Assets/Res/gsj/scripts/ReadRoom.cs +++ b/xiaofang/Assets/Res/gsj/scripts/ReadRoom.cs @@ -76,6 +76,7 @@ public class ReadRoom : MonoBehaviour //Player.CSZS.SetPlayerID(room.PlayerList[i].RoleId); Debug.Log("可以直接进入房间"); SceneManager.LoadScene("Tmap 1"); + Debug.Log(room.RoomId); test.JoinRoom(room.RoomId); //if,(GlobalData.ServerData.data.openId==) //isenter = true; @@ -182,6 +183,7 @@ public class ReadRoom : MonoBehaviour //传人物职业ID //Player.CSZS.SetPlayerID(room.PlayerList[i].RoleId); Debug.Log("可以直接进入房间"); + test.JoinRoom(room.RoomId); SceneManager.LoadScene("Tmap 1"); //if(GlobalData.ServerData.data.openId==) //.isenter = true; diff --git a/xiaofang/Assets/Scenes/loginscene.unity b/xiaofang/Assets/Scenes/loginscene.unity index 9c338633..5595c779 100644 --- a/xiaofang/Assets/Scenes/loginscene.unity +++ b/xiaofang/Assets/Scenes/loginscene.unity @@ -4908,7 +4908,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: token: - wEBScriptListener: {fileID: 0} + wEBScriptListener: {fileID: 7695717545649794845} --- !u!222 &7801660036457041520 CanvasRenderer: m_ObjectHideFlags: 0