Beispiel #1
0
 public override void AbortEvent()
 {
     base.AbortEvent();
     if (objToClimbInstance != null)
     {
         objToClimbInstance.GetComponentInChildren <VRTK.VRTK_InteractableObject>().ForceStopInteracting();
     }
     VRTK.VRTK_PlayerClimb climb = GameObject.Find("VRTKScripts").transform.Find("PlayArea")
                                   .GetComponent <VRTK.VRTK_PlayerClimb>();
     climb.enabled = false;
     climb.enabled = true;
     Destroy(objToClimbInstance);
     Destroy(objToTouchInstance);
 }
Beispiel #2
0
    public override void CompleteEvent()
    {
        base.CompleteEvent();
        var Target = GameObject.Find("Score");

        Target.GetComponent <ScoreBoard>().SetActive();

        objToClimbInstance.GetComponentInChildren <VRTK.VRTK_InteractableObject>().ForceStopInteracting();
        VRTK.VRTK_PlayerClimb climb = GameObject.Find("VRTKScripts").transform.Find("PlayArea")
                                      .GetComponent <VRTK.VRTK_PlayerClimb>();
        climb.enabled = false;
        climb.enabled = true;
        Destroy(objToClimbInstance);
        Destroy(objToTouchInstance);
    }
Beispiel #3
0
 protected virtual void Awake()
 {
     bodyPhysics = (bodyPhysics != null ? bodyPhysics : FindObjectOfType <VRTK_BodyPhysics>());
     playerClimb = (playerClimb != null ? playerClimb : FindObjectOfType <VRTK_PlayerClimb>());
     VRTK_SDKManager.instance.AddBehaviourToToggleOnLoadedSetupChange(this);
 }