예제 #1
0
파일: Climb.cs 프로젝트: zsacul/TeacherVR
 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);
 }
예제 #2
0
파일: Climb.cs 프로젝트: zsacul/TeacherVR
    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);
    }
예제 #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);
 }