Esempio n. 1
0
    public override void OnLobbyClientEnter( )
    {
        GameObject[] matchUI = GameObject.FindGameObjectsWithTag("match ui");
        for (int i = 0; i < matchUI.Length; i++)
        {
            Destroy(matchUI[i]);
        }
        GameObject roomUI = Instantiate(Resources.Load("ui/room ui")) as GameObject;

        MessageDefine.PlayerInfoMessage playerInfoMsg = new MessageDefine.PlayerInfoMessage();
        playerInfoMsg.name = KiiUser.CurrentUser.Displayname;
        client.Send(MessageDefine.PlayerInfoMsgId, playerInfoMsg);
    }
Esempio n. 2
0
    private void _OnServerGotPlayerInfo(NetworkMessage msg)
    {
        MessageDefine.PlayerInfoMessage infoMsg = msg.ReadMessage <MessageDefine.PlayerInfoMessage>();
        NetworkedPlayerInfo             info;

        info.name = infoMsg.name;
        if (m_playerInfos == null)
        {
            m_playerInfos = new Dictionary <int, NetworkedPlayerInfo>();
        }
        m_playerInfos.Add(msg.conn.connectionId, info);
        var ack = new EmptyMessage();

        NetworkServer.SendToClient(msg.conn.connectionId, MessageDefine.ServerGotPlayerInfoMsgId, ack);
    }
Esempio n. 3
0
 public override void OnLobbyClientEnter( )
 {
     GameObject[] matchUI = GameObject.FindGameObjectsWithTag("match ui");
     for (int i = 0; i < matchUI.Length; i++)
     {
         Destroy(matchUI[i]);
     }
     GameObject roomUI = Instantiate(Resources.Load("ui/room ui")) as GameObject;
     MessageDefine.PlayerInfoMessage playerInfoMsg = new MessageDefine.PlayerInfoMessage();
     playerInfoMsg.name = KiiUser.CurrentUser.Displayname;
     client.Send(MessageDefine.PlayerInfoMsgId, playerInfoMsg);
 }