Beispiel #1
0
 void OnDestroy()
 {
     MLInput.OnControllerButtonUp -= OnButtonUp;
     MLInput.Stop();
 }
Beispiel #2
0
 void OnDestroy()
 {
     MLInput.Stop();
 }
Beispiel #3
0
 /// <summary>
 /// Unregister event handler
 /// </summary>
 void OnDestroy()
 {
     MLInput.OnControllerButtonDown -= HandleOnButtonDown;
     MLInput.Stop();
 }
Beispiel #4
0
 private void OnDisable()
 {
     MLInput.OnTriggerUp -= OnTriggerUp;
     MLInput.Stop();
 }
 private void OnDestroy()
 {
     MLInput.Stop();
     MLInput.OnTriggerDown -= HandleOnTriggerDown;
     MLInput.OnTriggerUp   -= HandleOnTriggerUp;
 }
Beispiel #6
0
 private void OnDestroy()
 {
     controller.OnButtonDown -= HandleButtonDown;
     MLInput.Stop();
 }
Beispiel #7
0
 void OnDestroy()    // Stop eye tracking and inputs.
 {
     MLEyes.Stop();
     MLInput.OnTriggerDown -= HandleOnTriggerDown;
     MLInput.Stop();
 }
Beispiel #8
0
 /// <summary>
 /// Stop MLInput.
 /// </summary>
 private void OnDestroy()
 {
     #if PLATFORM_LUMIN
     MLInput.Stop();
     #endif
 }
Beispiel #9
0
 void OnDestroy()
 {
     //Stop receiving input by the Control
     MLInput.Stop();
 }
Beispiel #10
0
 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);
                 }
             });
         }
     }
 }
Beispiel #12
0
 /// <summary>
 /// Cleans up the component.
 /// </summary>
 void OnDisable()
 {
     MLInput.Stop();
 }