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); }
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); }