Exemplo n.º 1
0
 public virtual void RecalcForcesAndClearBody(bool p_forceRecalc = false, bool p_ropesMassOnly = false)
 {
     if (_needRecalcAndClear || p_forceRecalc)
     {
         RecalcForces(true, p_ropesMassOnly);
         _needRecalcAndClear = false;
         RopeInternalUtils.TryClearRigidBody2D(RigidBody2DComponent);
         ResetTimeToLerp();
     }
 }
Exemplo n.º 2
0
 protected virtual void LateUpdate()
 {
     if (_firstUpdate && s_instance == this)
     {
         _firstUpdate = false;
         var v_bodies = Object.FindObjectsOfType <Rigidbody2D>();
         foreach (var v_body in v_bodies)
         {
             if (v_body != null)
             {
                 RopeInternalUtils.TryClearRigidBody2D(v_body);
             }
         }
     }
 }