ProjectStorms.ShipPartDestroy.ApplyPartCollision C# (CSharp) Method

ApplyPartCollision() private method

Actually applies the collision to the part, shares this method with the trigger system.
private ApplyPartCollision ( ShipPart a_part, float a_colVelSqr ) : void
a_part ShipPart Ship part collision.
a_colVelSqr float Squared collision velocity.
return void
        private void ApplyPartCollision(ShipPart a_part, float a_colVelSqr)
        {
            // Cache part squared velocity
            if (Mathf.Approximately(a_part.cached_breakVelocitySqr, 0))
            {
                a_part.cached_breakVelocitySqr = a_part.breakVelocity * a_part.breakVelocity;
            }

            // Break the part if the collision is fast enough
            if (!IsPartDestroyed(a_part) && a_colVelSqr >= a_part.cached_breakVelocitySqr)
            {
                //BreakPart(a_part);
            }
        }