void OnDestroy() { MLInput.OnControllerButtonUp -= OnButtonUp; MLInput.Stop(); }
void OnDestroy() { MLInput.Stop(); }
/// <summary> /// Unregister event handler /// </summary> void OnDestroy() { MLInput.OnControllerButtonDown -= HandleOnButtonDown; MLInput.Stop(); }
private void OnDisable() { MLInput.OnTriggerUp -= OnTriggerUp; MLInput.Stop(); }
private void OnDestroy() { MLInput.Stop(); MLInput.OnTriggerDown -= HandleOnTriggerDown; MLInput.OnTriggerUp -= HandleOnTriggerUp; }
private void OnDestroy() { controller.OnButtonDown -= HandleButtonDown; MLInput.Stop(); }
void OnDestroy() // Stop eye tracking and inputs. { MLEyes.Stop(); MLInput.OnTriggerDown -= HandleOnTriggerDown; MLInput.Stop(); }
/// <summary> /// Stop MLInput. /// </summary> private void OnDestroy() { #if PLATFORM_LUMIN MLInput.Stop(); #endif }
void OnDestroy() { //Stop receiving input by the Control MLInput.Stop(); }
private void OnDisable() { line.enabled = false; MLInput.Stop(); }
void HandleOnTriggerDown(byte controllerId, float value) { if (currentColor == level) { matchCount.text = level + " / 3"; // Update countdown. if (level == 1) { pubnub.Publish() .Channel("tp") .Message("l2") .Async((result, status) => { if (!status.Error) { Debug.Log(string.Format("Publish Timetoken: {0}", result.Timetoken)); } else { Debug.Log(status.Error); Debug.Log(status.ErrorData.Info); } }); } else if (level == 2) { pubnub.Publish() .Channel("tp") .Message("l3") .Async((result, status) => { if (!status.Error) { Debug.Log(string.Format("Publish Timetoken: {0}", result.Timetoken)); } else { Debug.Log(status.Error); Debug.Log(status.ErrorData.Info); } }); } else if (level == 3) { pubnub.Publish() .Channel("tp") .Message("release") .Async((result, status) => { if (!status.Error) { Debug.Log(string.Format("Publish Timetoken: {0}", result.Timetoken)); } else { Debug.Log(status.Error); Debug.Log(status.ErrorData.Info); } }); MLInput.OnTriggerDown -= HandleOnTriggerDown; MLInput.Stop(); StartCoroutine(NextScene()); // Game over - win } level = level + 1; } else { if (level <= 3) // Back to L1 { level = 1; matchCount.text = "0 / 3"; // Reset countdown. pubnub.Publish() .Channel("tp") .Message("l1") .Async((result, status) => { if (!status.Error) { Debug.Log(string.Format("Publish Timetoken: {0}", result.Timetoken)); } else { Debug.Log(status.Error); Debug.Log(status.ErrorData.Info); } }); } } }
/// <summary> /// Cleans up the component. /// </summary> void OnDisable() { MLInput.Stop(); }