玩家位置

This commit is contained in:
huyulong 2024-12-29 15:45:46 +08:00
parent 023dd663e1
commit d13685c99e
3 changed files with 7 additions and 4 deletions

View File

@ -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<PlayerJoinResponse>(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;

View File

@ -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;

View File

@ -4908,7 +4908,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
token:
wEBScriptListener: {fileID: 0}
wEBScriptListener: {fileID: 7695717545649794845}
--- !u!222 &7801660036457041520
CanvasRenderer:
m_ObjectHideFlags: 0