// Update is called once per frame void Update() { if (grabbable.isGrabbed && OVRInput.GetDown(vrShootButton, grabbable.grabbedBy.GetController())) { simpleShoot.TriggerShoot(); } }
// Update is called once per frame void Update() { if (OVRInput.GetDown(trigger)) { simpleShoot.TriggerShoot(); } }
// Update is called once per frame void Update() { if (OVRInput.GetDown(shootingButton)) { simpleShoot.TriggerShoot(); } }
// Update is called once per frame void Update() { if (ovrGrabbable.isGrabbed && OVRInput.GetDown(shootButton, ovrGrabbable.grabbedBy.getController())) { //Shoot simpleShoot.TriggerShoot(); } }
// Update is called once per frame void Update() { if (ovrGrabbale.isGrabbed && OVRInput.GetDown(shootingButton, ovrGrabbale.grabbedBy.GetController()) && maxNumberOfBullets > 0) { //Shoot!! simpleShoot.TriggerShoot(); maxNumberOfBullets--; bulletText.text = maxNumberOfBullets.ToString(); } }
private void ProcessTouchpadDown() { if (!m_CurrentObject) { return; } Interactable interactable = m_CurrentObject.GetComponent <Interactable>(); interactable.Pressed(); simpleShoot.TriggerShoot(); }
void Update() { if (grabbable.isGrabbed && OVRInput.GetDown(shootInput, grabbable.grabbedBy.Controller)) { if (audio) { audio.Play(); OVRVibration.Trigger(audio.clip, grabbable.grabbedBy.Controller); } shootBehaviour.TriggerShoot(); } }
// Update is called once per frame void Update() { if (ovrGrabbable.isGrabbed && OVRInput.GetDown(shootingButton, ovrGrabbable.grabbedBy.GetController()) && maxNumberOfBullets > 0) { // Shoot! VibrationManager.singleton.TriggerVibration(40, 2, 255, ovrGrabbable.grabbedBy.GetController()); //Trigger Haptic : //DONT DO THIS !!! OVRInput.SetControllerVibration(0.5f, 0.5f, ovrGrabbable.grabbedBy.GetController()); //DO THIS GetComponent <AudioSource>().PlayOneShot(shootingAudio); simpleShoot.TriggerShoot(); maxNumberOfBullets--; bulletText.text = maxNumberOfBullets.ToString(); } }
// Update is called once per frame void Update() { if (Time.time >= nextTime) { bulletText.text = DateTime.Now.ToString(); nextTime += interval; } if (ovrGrabbable.isGrabbed && OVRInput.GetDown(shootingButton, ovrGrabbable.grabbedBy.GetController())) { // Shoot; simpleShoot.TriggerShoot(); FindObjectOfType <AudioManager>().Play("Gun Shot"); FindObjectOfType <AudioManager>().Play("Bolt Action"); // vibration with and without audio clip (clip as a frequency sample) VibrationManager.singleton.TriggerVibration(GunShotClip, ovrGrabbable.grabbedBy.GetController()); //VibrationManager.singleton.TriggerVibration(40, 2, 255, ovrGrabbable.grabbedBy.GetController()); maxNumberOfBullet--; //bulletText.text = maxNumberOfBullet.ToString(); } }