예제 #1
0
    public void SendWindowMsg(int connID)
    {
        if (!NetworkClient.active)
        {
            return;
        }
        WindowMessage msg = new WindowMessage {
            connID       = network.connID,
            targetConnID = connID,
            pos          = positions[connID],
            size         = sizes[connID]
        };

        network.Send(NSGMsgType.Window, msg);
    }
예제 #2
0
    public void SendPlayerMsg(int idx, int portalIdx = 0)
    {
        if (!NetworkClient.active)
        {
            return;
        }
        PlayerMessage msg = new PlayerMessage {
            connID       = network.connID,
            targetConnID = idx,
            pos          = players[idx].position,
            camPos       = cameras[idx].transform.position,
            portalIdx    = portalIdx
        };

        network.Send(NSGMsgType.Player, msg);
    }