ProjectStorms.ShipPartDestroy.BreakPart C# (CSharp) Method

BreakPart() public method

Breaks the part, takes mass and hampers control to the ship.
public BreakPart ( ShipPart a_part ) : void
a_part ShipPart The part to test
return void
        public void BreakPart(ShipPart a_part)
        {
            // Make the mass change to the parent
            m_shipTray.shipPartMassAdd -= a_part.partMass;

            // Disable the part
            a_part.partObject.SetActive(false);

            // For testing ship death
            TestShipDestroyed(a_part);
        }