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); }
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); }
protected virtual void Awake() { bodyPhysics = (bodyPhysics != null ? bodyPhysics : FindObjectOfType <VRTK_BodyPhysics>()); playerClimb = (playerClimb != null ? playerClimb : FindObjectOfType <VRTK_PlayerClimb>()); VRTK_SDKManager.instance.AddBehaviourToToggleOnLoadedSetupChange(this); }