void Update() { ThalmicHub hub = ThalmicHub.instance; if (Input.GetKeyDown("q")) { hub.ResetHub(); } }
void Update() { ThalmicHub hub = ThalmicHub.instance; if (Input.GetKeyDown("w")) { hub.ResetHub(); } timeForInstructions -= Time.deltaTime; }
void Update() { ThalmicHub hub = ThalmicHub.instance; computing.Compute(); if (Input.GetKeyDown("q")) { hub.ResetHub(); } if (Input.GetKeyDown("f")) { fast = !fast; } if (GuiDisplay.startButton || Input.GetKeyDown("space")) { startSession.Session(); } if (GuiDisplay.stopButton || Input.GetKeyDown("s")) { stopSession.Session(); } if (GuiDisplay.testButton || Input.GetKeyDown("t")) { StartCoroutine(testSession.Session()); } if (Input.GetKeyDown("p")) { pauseSession.Pause(); } if (Input.GetKeyDown("m")) { pauseSession.UnPause(); } /* Update timer */ if (startTimer) { time += Time.deltaTime; } /* Update time left to play a chord */ if (testingState) { timingLeft -= Time.deltaTime; } }
// Myo game object to connect with. // This object must have a ThalmicMyo script attached. void Update() { SoundManager.getInstance().updateSoundManager(); if (Input.GetKey("escape")) Application.Quit(); thalmicMyo = myo.GetComponent<ThalmicMyo> (); hub = ThalmicHub.instance; if (Input.GetKeyDown("q")) { hub.ResetHub(); } //if ( }
// Update is called once per frame void Update() { hub = ThalmicHub.instance; if(thalmicMyo != null && thalmicMyo.pose.ToString() == "Fist"){ if(player == null){ player = GameObject.FindGameObjectWithTag("Player"); } player.animation.Play("punch_hi_left"); } if (Input.GetKeyDown ("q")) { hub.ResetHub(); } }
void Update() { string alert = ""; //Die if (isDying) { if (Input.GetKeyDown(KeyCode.Escape)) { Application.LoadLevel("01-menu"); return; } if (Input.GetKeyDown(KeyCode.R)) { Application.LoadLevel("02-lvl01"); return; } if (thalmicMyo.pose != lastPose) { lastPose = thalmicMyo.pose; if (thalmicMyo.pose == Pose.WaveOut) { Application.LoadLevel("02-lvl01"); return; } } return; } //Reconnect to Myo if (Input.GetKeyDown("q")) { hub.ResetHub(); } //Verifying Connections if (!hub.hubInitialized) { alert = "Cannot connect to Myo\n" + "Press Q to try again"; } else if (!thalmicMyo.isPaired) { alert = "No Myo currently paired."; } else if (!thalmicMyo.armSynced) { alert = "Perform the Sync Gesture."; } else { alert = ""; } //Pause, unpause game if necesary if (!string.IsNullOrEmpty(alert)) { //pauseAndShowAlert(alert); isPaused = true; } else if (isPaused) { //unpause(); } }