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