コード例 #1
0
ファイル: PusherStickyToggle.cs プロジェクト: emmacp/test2
 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);
     }
 }
コード例 #2
0
ファイル: PusherStickyToggle.cs プロジェクト: emmacp/test2
 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);
     }
 }