private void On_NETWORK_StartedHost(BEHandle handle) { LogNotification("Started new Host."); // Stop looking for hosts on the netwrok //StopCoroutine(connctionTimeoutEnumerator); }
private void On_NETWORK_ConnectedToHost(BEHandle <ENetworkID> handle) { LogNotification("Connected to host as : " + handle.Arg1); // Stop looking for hosts on the netwrok //StopCoroutine(connctionTimeoutEnumerator); }
private void On_NETWORK_NetworkStateUpdated(BEHandle <ENetworkState> handle) { if (networkIDText) { networkIDText.SetText("NetworkID : " + BEventManager.Instance.LocalNetworkID); } }
private void On_TEST_CounterIncrement(BEHandle <int> handle) { counter = handle.Arg1 + 1; if (IS_NOT_NULL(counterBText)) { counterBText.SetText("Counter : " + counter); } }
private void On_AR_TrackerFound(BEHandle <string, Vector3, Quaternion> handle) { //if (IS_NOT_NULL(newTracker)) //{ // if (newTracker.TrackerName == "TrackerImage_Test") // { // tracker = newTracker; // image.SetColor(Color.green); // } //} }
private void On_NETWORK_NetworkStateUpdated(BEHandle <ENetworkState> handle) { if (handle.Arg1 != ENetworkState.NOT_CONNECTED) { ReinitializeDiscovery(); InvokeEventIfBound(DiscoveredServersUpdated, DiscoveredServers.Keys.ToArray()); } else { FindServers(); } }
private void On_AR_NewPlayAreaSet(BEHandle <BAnchorInformation[]> handle) { if (handle.InvokingNetworkID != BEventManager.Instance.LocalNetworkID) { AbstractPlayArea playArea = SpawnNewPlayArea(); playArea.Owner = handle.InvokingNetworkID; if (IS_NOT_NULL(playArea)) { playArea.SetUpPlayArea(handle.Arg1); } } }
private void On_AR_BAnchorSpawned(BEHandle <BAnchorInformation, string> handle) { BAnchorInformation bAnchorInformation = handle.Arg1; string bAnchorID = handle.Arg2; BAnchor bAnchorPrefab = GetBAnchorPrefab(bAnchorID); if (handle.InvokingNetworkID != BEventManager.Instance.LocalNetworkID && IS_NOT_NULL(bAnchorPrefab) && IS_NOT_NULL(bAnchorInformation)) { BAnchor spawnedBAnchor = Instantiate(bAnchorPrefab, Vector3.zero, Quaternion.identity); spawnedBAnchor.SetTransformedPosition(bAnchorInformation.TransformedPosition); spawnedBAnchor.SetTransformedRotation(bAnchorInformation.TransformedRotation); spawnedBAnchor.Owner = handle.InvokingNetworkID; BEventsCollection.AR_BAnchorSpawned.Invoke(new BEHandle <BAnchorInformation, string>(bAnchorInformation, bAnchorID), BEventReplicationType.LOCAL, true); } }
private void On_NETWORK_DiscoveredHostsUpdated(BEHandle <string[]> handle) { int hostsCount = handle.Arg1.Length; LogNotification("Discovered hosts list updated : " + hostsCount); if (hostsCount == 0) { serversCountText.SetText("No Hosts found."); connectToServerButton.DisableButton(); //connectToServerButton.CanBeShown = false; } else { serversCountText.SetText("Hosts : " + hostsCount); //connectToServerButton.CanBeShown = true; connectToServerButton.EnableButton(); } }
private void On_NETWORK_NewBEventDispatcherSet(BEHandle <AbstractBEventDispatcher> handle) { if (IS_NOT_NULL(dispatcherText)) { dispatcherText.SetText(handle.Arg1.GetBEventDispatcherType().ToString()); } if (IS_NOT_NULL(dispatcherButton)) { switch (handle.Arg1.GetBEventDispatcherType()) { case BEventDispatcherType.MIRROR: dispatcherButton.SetButtonText("Switch Ubii"); break; default: dispatcherButton.SetButtonText("Switch Mirror"); break; } } }
private void On_NETWORK_NetworkStateUpdated(BEHandle <ENetworkState> handle) { if (IS_NOT_NULL(bFrame) && (IS_NOT_NULL(notConnectedMenu)) && (IS_NOT_NULL(hostMenu)) && (IS_NOT_NULL(clientMenu))) { switch (handle.Arg1) { case ENetworkState.NOT_CONNECTED: bFrame.UpdateCurrentBMenu(notConnectedMenu); break; case ENetworkState.HOST: bFrame.UpdateCurrentBMenu(hostMenu); break; case ENetworkState.CLIENT: bFrame.UpdateCurrentBMenu(clientMenu); break; } } }
private void On_TEST_ImagePosition(BEHandle <Vector3> bEHandle) { transform.position = bEHandle.Arg1; }
private void On_NETWORK_NewNetworkIDDisconnected(BEHandle <ENetworkID> handle) { LogNotification("Client disconnected : " + handle.Arg1); }
private void On_TEST_FloatTest(BEHandle <float> handle) { LogConsole("On_TEST_FloatTest : " + BUtils.GetTimeAsString()); }
private void On_NETWORK_ConnectionStoped(BEHandle obj) { LogNotification("The connection was stopped"); }
private void On_TEST_Vector3Test(BEHandle <Vector3> handle) { LogConsole("On_TEST_Vector3Test : " + BUtils.GetTimeAsString()); }
private void On_TEST_TrackerMoved(BEHandle <Vector3> handle) { transform.position = handle.Arg1; }
private void On_TEST_ObjectTest(BEHandle <BallDroneBAnchor> handle) { LogConsole("On_TEST_ObjectTest : " + BUtils.GetTimeAsString()); }