public override void StartUsing(VRTK.VRTK_InteractUse currentUsingObject)
 {
     Debug.Log("START USING");
     base.StartUsing(currentUsingObject);
     FireProjectile();
     VRTK.VRTK_ControllerHaptics.TriggerHapticPulse(VRTK.VRTK_ControllerReference.GetControllerReference(controllerEvents.gameObject), 0.63f, 0.2f, 0.01f);
 }
示例#2
0
 public override void StartUsing(VRTK_InteractUse currentUsingObject)
 {
     base.StartUsing(currentUsingObject);
     light0.intensity = 2.1f;
     light1.intensity = 2.1f;
     light2.intensity = 2.02f;
 }
示例#3
0
 public override void StopUsing(VRTK_InteractUse previousUsingObject = null, bool resetUsingObjectState = true)
 {
     base.StopUsing(previousUsingObject, resetUsingObjectState);
     light0.intensity = 0f;
     light1.intensity = 0f;
     light2.intensity = 0f;
 }
示例#4
0
 public override void StopUsing(VRTK_InteractUse previousUsingObject = null, bool resetUsingObjectState = true)
 {
     base.StopUsing(previousUsingObject, resetUsingObjectState);
     flameParticles.Pause();
     flameParticles.Clear();
     Torch.Laser.enabled = false;
 }
示例#5
0
 public override void StartUsing(VRTK.VRTK_InteractUse currentUsingObject)
 {
     Debug.Log("Hello darkness my old friend");
     base.StartUsing(currentUsingObject);
     voiceOverAudio.Stop();
     voiceOverAudio.clip = youMakeLaughClip;
     voiceOverAudio.Play();
 }
 public override void Grabbed(VRTK.VRTK_InteractGrab currentGrabbingObject = null)
 {
     base.Grabbed(currentGrabbingObject);
     VRTK.VRTK_InteractUse iu = currentGrabbingObject.gameObject.GetComponent <VRTK.VRTK_InteractUse> ();
     if (iu == null)
     {
         iu = currentGrabbingObject.gameObject.AddComponent <VRTK.VRTK_InteractUse> ();
     }
 }
示例#7
0
 public override void StartUsing(VRTK_InteractUse usingObject)
 {
     base.StartUsing(usingObject);
     StartGame();
     if (GameManager.singleton.shootingCurState == GameManager.ShootingGameState.GameStart)
     {
         GameManager.singleton.currentTime = GameManager.singleton.Timeleft;
         StartCoroutine(TargetTimer());
     }
 }
 public override void StartUsing(VRTK_InteractUse currentUsingObject = null)
 {
     base.StartUsing(currentUsingObject);
     StaticData.setTargetTapeLength(this.name.ToLower());
     Debug.Log("go to next scene");
     /* change scene */
     // StaticData.resetAll();
     SceneManager.LoadScene("Animation");
     // SceneManager.LoadScene(StaticData.getTargetNumName());
     StopUsing();
 }
 protected virtual void ResetUsingObject()
 {
     if (usingObject != null)
     {
         VRTK_InteractUse usingObjectScript = usingObject.GetComponent <VRTK_InteractUse>();
         if (usingObjectScript != null)
         {
             usingObjectScript.ForceResetUsing();
         }
     }
 }
示例#10
0
        protected virtual void OnEnable()
        {
            animator          = GetComponent <Animator>();
            controllerEvents  = (controllerEvents != null ? controllerEvents : GetComponentInParent <VRTK_ControllerEvents>());
            interactNearTouch = (interactNearTouch != null ? interactNearTouch : GetComponentInParent <VRTK_InteractNearTouch>());
            interactTouch     = (interactTouch != null ? interactTouch : GetComponentInParent <VRTK_InteractTouch>());
            interactGrab      = (interactGrab != null ? interactGrab : GetComponentInParent <VRTK_InteractGrab>());
            interactUse       = (interactUse != null ? interactUse : GetComponentInParent <VRTK_InteractUse>());

            controllerReference = VRTK_ControllerReference.GetControllerReference(controllerEvents.gameObject);
        }
示例#11
0
        protected virtual void OnEnable()
        {
            animator          = GetComponent <Animator>();
            controllerEvents  = (controllerEvents != null ? controllerEvents : GetComponentInParent <VRTK_ControllerEvents>());
            interactNearTouch = (interactNearTouch != null ? interactNearTouch : GetComponentInParent <VRTK_InteractNearTouch>());
            interactTouch     = (interactTouch != null ? interactTouch : GetComponentInParent <VRTK_InteractTouch>());
            interactGrab      = (interactGrab != null ? interactGrab : GetComponentInParent <VRTK_InteractGrab>());
            interactUse       = (interactUse != null ? interactUse : GetComponentInParent <VRTK_InteractUse>());

            controllerReference = VRTK_ControllerReference.GetControllerReference(controllerEvents.gameObject);

            transform.localRotation = Quaternion.identity;
            transform.localPosition = -0.15f * Vector3.forward;
        }
 protected virtual void ResetUseState(GameObject checkObject)
 {
     if (checkObject != null)
     {
         VRTK_InteractUse usingObjectCheck = checkObject.GetComponent <VRTK_InteractUse>();
         if (usingObjectCheck != null)
         {
             if (holdButtonToUse)
             {
                 usingObjectCheck.ForceStopUsing();
             }
         }
     }
 }
示例#13
0
 // Token: 0x060016C6 RID: 5830 RVA: 0x0007AD00 File Offset: 0x00078F00
 protected virtual void CheckUse(GameObject interactingObject)
 {
     if (this.useOnTouchWhen != VRTK_ObjectTouchAutoInteract.AutoInteractions.Never && this.reuseTimer < Time.time)
     {
         VRTK_InteractUse component = interactingObject.GetComponent <VRTK_InteractUse>();
         if (component != null && (this.useOnTouchWhen == VRTK_ObjectTouchAutoInteract.AutoInteractions.NoButtonHeld || (this.useOnTouchWhen == VRTK_ObjectTouchAutoInteract.AutoInteractions.ButtonHeld && component.IsUseButtonPressed())))
         {
             if (!this.interactableObject.holdButtonToUse && this.interactableObject.IsUsing(null))
             {
                 this.interactableObject.ForceStopInteracting();
                 return;
             }
             component.AttemptUse();
         }
     }
 }
示例#14
0
 protected virtual void CheckUse(GameObject interactingObject)
 {
     if (useOnTouchWhen != AutoInteractions.Never && reuseTimer < Time.time)
     {
         VRTK_InteractUse interactUseScript = interactingObject.GetComponentInChildren <VRTK_InteractUse>();
         if (interactUseScript != null && (useOnTouchWhen == AutoInteractions.NoButtonHeld || (useOnTouchWhen == AutoInteractions.ButtonHeld && interactUseScript.IsUseButtonPressed())))
         {
             if (!interactableObject.holdButtonToUse && interactableObject.IsUsing())
             {
                 interactableObject.ForceStopInteracting();
             }
             else
             {
                 interactUseScript.AttemptUse();
             }
         }
     }
 }
示例#15
0
 public override void StartUsing(VRTK_InteractUse currentUsingObject)
 {
     base.StartUsing(currentUsingObject);
     if (tag == ("KnightDoor"))
     {
         Knight();
     }
     if (tag == ("MageDoor"))
     {
         Mage();
     }
     if (tag == ("Exit"))
     {
         Quit();
     }
     if (tag == ("Tavern"))
     {
         Tavern();
     }
     if (tag == ("Gary"))
     {
         Gary();
     }
 }
示例#16
0
 public override void StartUsing(VRTK_InteractUse usingObject)
 {
     print("USING");
 }
示例#17
0
 public override void StartUsing(VRTK.VRTK_InteractUse usingObject)
 {
     Debug.Log("test");
     base.StartUsing(usingObject);
     FireBolt();
 }
示例#18
0
 public override void StartUsing(VRTK_InteractUse currentUsingObject)
 {
     base.StartUsing(currentUsingObject);
     flameParticles.Play();
     Torch.Laser.enabled = true;
 }
示例#19
0
 // Use this for initialization
 void Start()
 {
     cEv     = GetComponent <VRTK.VRTK_ControllerEvents> ();
     grabber = GetComponent <VRTK.VRTK_InteractGrab> ();
     user    = GetComponent <VRTK.VRTK_InteractUse> ();
 }
示例#20
0
 public override void StartUsing(VRTK.VRTK_InteractUse usingObject)
 {
     base.StartUsing(usingObject);
     AddKey();
     Debug.Log("Triggered");
 }
示例#21
0
 public override void StartUsing(VRTK.VRTK_InteractUse usingObject)
 {
     base.StartUsing(usingObject);
     StartCoroutine(LoadNewScene());
 }
 public override void StopUsing(VRTK.VRTK_InteractUse usingObject)
 {
     base.StopUsing(usingObject);
     ps.Stop();
 }
示例#23
0
 public override void StartUsing(VRTK_InteractUse usingObject)
 {
     base.StartUsing(usingObject);
     Magneetti();
 }
示例#24
0
 public override void StartUsing(VRTK_InteractUse usingObject)
 {
     base.StartUsing(usingObject);
     Spawn();
 }
示例#25
0
 public override void StartUsing(VRTK_InteractUse currentUsingObject)
 {
     vam.grabGoal();
 }
示例#26
0
 public override void StopUsing(VRTK_InteractUse usingObject)
 {
 }
 public override void StartUsing(VRTK.VRTK_InteractUse usingObject)
 {
     base.StartUsing(usingObject);
     ps.Play();
     ps.Emit(triggerBurst);
 }
示例#28
0
 protected virtual void GetInteractUse()
 {
     interactUse = (interactUse != null ? interactUse : GetComponentInChildren <VRTK_InteractUse>());
     interactUse = (interactUse == null && controllerEvents != null ? controllerEvents.GetComponentInChildren <VRTK_InteractUse>() : interactUse);
 }
示例#29
0
 public override void StartUsing(VRTK_InteractUse usingObject)
 {
     base.StartUsing();
     StartGame();
     StartCoroutine(TargetTimer());
 }