Ejemplo n.º 1
0
 public bool AddSoftBody(BSoftBody softBody)
 {
     if (!(m_world is BulletSharp.SoftBody.SoftRigidDynamicsWorld))
     {
         if (debugType <= BDebug.DebugType.Trace)
         {
             Debug.LogErrorFormat("The Physics World must be a BSoftBodyWorld for adding soft bodies");
         }
         return(false);
     }
     if (!_isDisposed)
     {
         if (debugType >= BDebug.DebugType.Debug)
         {
             Debug.LogFormat(softBody, "Adding softbody {0} to world", softBody.name);
         }
         if (softBody._BuildCollisionObject())
         {
             ((BulletSharp.SoftBody.SoftRigidDynamicsWorld)m_world).AddSoftBody((SoftBody)softBody.GetCollisionObject());
             softBody.isInWorld = true;
         }
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
 public void OnEnable()
 {
     bSoftBodyTarget  = (BSoftBody)target;
     softBodySettings = serializedObject.FindProperty("_softBodySettings");
     if (inspectorMeshSettings == null)
     {
         inspectorMeshSettings = new BAnyMeshSettingsForEditor();
     }
 }
 public bool AddSoftBody(BSoftBody softBody)
 {
     if (!(World is BulletSharp.SoftBody.SoftRigidDynamicsWorld))
     {
         Debug.LogError("The Physics World must be a BSoftBodyWorld for adding soft bodies");
         return(false);
     }
     if (!_isDisposed)
     {
         Debug.LogFormat("Adding softbody {0} to world", softBody);
         if (softBody.BuildSoftBody())
         {
             ((BulletSharp.SoftBody.SoftRigidDynamicsWorld)World).AddSoftBody(softBody.GetSoftBody());
         }
         return(true);
     }
     return(false);
 }
 public void OnEnable()
 {
     bSoftBodyTarget = (BSoftBody)target;
     softBodySettings = serializedObject.FindProperty("_softBodySettings");
 }
Ejemplo n.º 5
0
 public void OnEnable()
 {
     bSoftBodyTarget  = (BSoftBody)target;
     softBodySettings = serializedObject.FindProperty("_softBodySettings");
 }
Ejemplo n.º 6
0
 public bool AddSoftBody(BSoftBody softBody)
 {
     if (!(m_world is BulletSharp.SoftBody.SoftRigidDynamicsWorld))
     {
         if (debugType >= BDebug.DebugType.Debug) Debug.LogFormat("The Physics World must be a BSoftBodyWorld for adding soft bodies");
         return false;
     }
     if (!_isDisposed)
     {
         if (debugType >= BDebug.DebugType.Debug) Debug.LogFormat("Adding softbody {0} to world", softBody);
         if (softBody._BuildCollisionObject())
         {
             ((BulletSharp.SoftBody.SoftRigidDynamicsWorld)m_world).AddSoftBody((SoftBody)softBody.GetCollisionObject());
             softBody.isInWorld = true;
         }
         return true;
     }
     return false;
 }
 public bool AddSoftBody(BSoftBody softBody)
 {
     if (!(World is BulletSharp.SoftBody.SoftRigidDynamicsWorld)) {
         Debug.LogError("The Physics World must be a BSoftBodyWorld for adding soft bodies");
         return false;
     }
     if (!_isDisposed) {
         Debug.LogFormat("Adding softbody {0} to world", softBody);
         if (softBody.BuildSoftBody()) {
             ((BulletSharp.SoftBody.SoftRigidDynamicsWorld)World).AddSoftBody(softBody.GetSoftBody());
         }
         return true;
     }
     return false;
 }