Пример #1
0
        private void removeParachuteCap(String name, bool jettison)
        {
            if (String.IsNullOrEmpty(name))
            {
                return;
            }
            Transform tr = part.transform.FindRecursive(name);

            if (tr == null)
            {
                return;
            }
            if (jettison)
            {
                Vector3    force      = (part.transform.up * 100) + (part.transform.forward * 10);
                GameObject jettisoned = SSTUUtils.createJettisonedObject(tr.gameObject, part.rb.velocity, force, 0.15f);
                SSTUStockInterop.updatePartHighlighting(part);
            }
            else
            {
                GameObject.Destroy(tr.gameObject);
            }
        }