本文整理汇总了C#中Room.SetRoomInfo方法的典型用法代码示例。如果您正苦于以下问题:C# Room.SetRoomInfo方法的具体用法?C# Room.SetRoomInfo怎么用?C# Room.SetRoomInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Room
的用法示例。
在下文中一共展示了Room.SetRoomInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessMessage
public void ProcessMessage(BinaryMessage t_recvdMsg)
{
GameMessageReader t_reader = new GameMessageReader();
t_reader.InitAdapter(ref t_recvdMsg);
switch(t_reader.GetFunctionCode())
{
case (ushort)Function_Codes.FUNCTION_USER_NEWROOM:
{
string t_name = "";
ushort t_roomType = 0;
t_reader.Decode_FunctionUserNewRoom(ref t_roomType,
ref t_name);
if(t_roomType == (ushort)Function_Codes.ROOM_TYPE_CHAT)
{
Debug.Log("NEW ROOM CHAT!");
Room t_room = new Room();
t_room.SetRoomInfo(ref t_name, ref t_roomType);
m_controller.m_liveController.SendRoomStateData(t_room);
if(!m_controller.m_liveController.CheckDataSaved())
{
m_controller.m_liveController.SendClientUserData(m_clientUser);
}
Application.LoadLevel(0);
}
break;
}
}
}
示例2: ProcessFunctionUserNewRoom
//---------------------------------------------------------------------
//Client message specific process functions
bool ProcessFunctionUserNewRoom( ref GameMessageReader inMsgReader)
{
string t_roomName = "";
UInt16 t_roomType = 0;
inMsgReader.Decode_FunctionUserNewRoom(ref t_roomType,
ref t_roomName);
m_currentRoom.SetRoomInfo(ref t_roomName, ref t_roomType);
if (t_roomType == (ushort)Function_Codes.ROOM_TYPE_TANKS)
{
Debug.Log("NEW ROOM TANKS!");
m_controller.m_liveController.SendClientUserData(ClientUser);
Room t_room = new Room();
t_room.SetRoomInfo(ref t_roomName, ref t_roomType);
m_controller.m_liveController.SendRoomStateData(t_room);
m_controller.m_liveController.RemoveAllIntrest(this);
Application.LoadLevel(1);
}
return true;
}