完整的用户不会在房间里显示

时间:2014-05-28 09:02:19

标签: c# unity3d smartfoxserver

我在游戏中遇到问题,我已创建空间并允许2位用户输入如下

if(GUI.Button (new Rect(220,300,120,20), "Create Room"))
{   
    RoomSettings settings = new RoomSettings(roomName);   
    settings.MaxSpectators = 1;  
    settings.MaxUsers = 2;  
    settings.Name = roomName;  
    settings.Variables.Add(new SFSRoomVariable("AceOnAce", GameLogics.AceOnAce));
    settings.Variables.Add(new SFSRoomVariable("NoTrickWithAce", GameLogics.NoTricksWithAce));
    settings.Extension = new RoomExtension(extensionId, extensionClass);  
    NetworkCon.sfs.Send(new CreateRoomRequest(settings, true, NetworkCon.sfs.LastJoinedRoom));
}  

和onRoomAdded方法

public void OnRoomAdded(BaseEvent evt) 
{   
    Debug.Log ("Created");  
    Room room = (Room)evt.Params["room"];  
    //room.IsGame = true;  
    if ( room.IsGame ) 
    {  
        SetupRoomList();  
    }  
    room.GetVariables ();  
    Debug.Log (room.Name);
}

我的问题是,当我自己创建房间时,我无法看到这两个用户,但是当我加入其他用户创建的房间时,会显示这两个用户。它看起来像onJoinRoom工作正常但问题必须在创建空间。请帮忙 感谢。

0 个答案:

没有答案