Skip to content

Commit b3c30a4

Browse files
Merge branch 'MRTK-Master' into HTK-WorldAnchorManagerUpdate
2 parents 69313fd + 15df22e commit b3c30a4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Assets/HoloToolkit-Examples/SharingWithUNET/Scripts/NetworkDiscoveryWithAnchors.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class NetworkDiscoveryWithAnchors : NetworkDiscovery
2121
/// This flag gets set when we receive a broadcast.
2222
/// if this flag is set then we should not create a server.
2323
/// </summary>
24-
public bool receivedBroadcast { get; private set; }
24+
public bool ReceivedBroadcast { get; private set; }
2525

2626
/// <summary>
2727
/// Controls how often a broadcast should be sent to clients
@@ -79,8 +79,8 @@ private void Start()
7979
// We randomize how long we wait so that we reduce the chances that everyone joins at
8080
// once and decides that they are the server.
8181
// An alternative would be to create UI for managing who hosts.
82-
float InvokeWaitTime = 3 * BroadcastInterval + Random.value * 3 * BroadcastInterval;
83-
Invoke("MaybeInitAsServer", InvokeWaitTime * 0.001f);
82+
float invokeWaitTime = 3 * BroadcastInterval + Random.value * 3 * BroadcastInterval;
83+
Invoke("MaybeInitAsServer", invokeWaitTime * 0.001f);
8484
}
8585

8686
/// <summary>
@@ -89,8 +89,8 @@ private void Start()
8989
/// </summary>
9090
private void MaybeInitAsServer()
9191
{
92-
// If we Received a broadcast then we should not start as a server.
93-
if (receivedBroadcast)
92+
// If we receive a broadcast then we should not start as a server.
93+
if (ReceivedBroadcast)
9494
{
9595
return;
9696
}
@@ -138,14 +138,14 @@ private IEnumerator InitAsServer()
138138
public override void OnReceivedBroadcast(string fromAddress, string data)
139139
{
140140
// If we've already received a broadcast then we've already set everything up.
141-
if (receivedBroadcast)
141+
if (ReceivedBroadcast)
142142
{
143143
return;
144144
}
145145

146146
Debug.Log("Acting as client");
147147

148-
receivedBroadcast = true;
148+
ReceivedBroadcast = true;
149149

150150
// Stop listening for more broadcasts.
151151
StopBroadcast();

0 commit comments

Comments
 (0)