public void RoomListAdd(Global.RoomInfo p_Roominfo) { Debug.Log("방생성"); RoomInfo _room = new RoomInfo(); _room.roomNum = p_Roominfo.roomNumber; _room.roomName = p_Roominfo.roomName; _room.stageValue = (int)p_Roominfo.stage; _room.difficultyValue = (int)p_Roominfo.level; _room.userCount = p_Roominfo.userCount; _room.playerInfo = new List <PlayerInfo>(); GameManager.instance.roomList.Add(_room); }
/// <summary> /// 1. _room에 현재 플레이어 추가하기 /// 2. _room이름을 가진 방 입장하기 /// </summary> /// <param name="_room">방 이름</param> void EnterRoomScene(Global.RoomInfo _room) { // 1. //currentPlayer.roomEnterNum = _room.roomPlayer; //_room.playerInfo.Add(currentPlayer); GameManager.instance.setCurrentPlayer(currentPlayer); // 2. RoomInfo _enterRoomInfo = new RoomInfo(); _enterRoomInfo.roomNum = _room.roomNumber; _enterRoomInfo.roomName = _room.roomName; _enterRoomInfo.userCount = _room.userCount; GameManager.instance.setCurrentRoom(_enterRoomInfo); // GameManager.instance.StartCoroutine(GameManager.instance.AsyncLoadScene("RoomScene")); }