Esempio n. 1
0
 protected virtual void SetPositionTarget(VRTK_BaseControllable obj, float newTarget)
 {
     if (obj.GetType() == typeof(VRTK_PhysicsPusher))
     {
         VRTK_PhysicsPusher physicsObj = obj as VRTK_PhysicsPusher;
         physicsObj.positionTarget = newTarget;
     }
     else if (obj.GetType() == typeof(VRTK_ArtificialPusher))
     {
         VRTK_ArtificialPusher artificialObj = obj as VRTK_ArtificialPusher;
         artificialObj.SetPositionTarget(newTarget);
     }
 }
Esempio n. 2
0
 protected virtual void SetStayPressed(VRTK_BaseControllable obj, bool state)
 {
     if (obj.GetType() == typeof(VRTK_PhysicsPusher))
     {
         VRTK_PhysicsPusher physicsObj = obj as VRTK_PhysicsPusher;
         physicsObj.stayPressed = state;
     }
     else if (obj.GetType() == typeof(VRTK_ArtificialPusher))
     {
         VRTK_ArtificialPusher artificialObj = obj as VRTK_ArtificialPusher;
         artificialObj.SetStayPressed(state);
     }
 }