Esempio n. 1
0
 public void Close()
 {
     if (animator != null)
     {
         animator.Close();
     }
 }
Esempio n. 2
0
 protected override void on_anchor_detached()
 {
     base.on_anchor_detached();
     if (Animator != null)
     {
         Animator.Close();
     }
 }
Esempio n. 3
0
        public void Decouple()
        {
            var dockedPart = vessel[dockedPartUId];

            if (dockedPart != null)
            {
                restore_docking_info(dockedPart);
                var parent               = part.parent;
                var old_vessel           = vessel;
                var referenceTransformId = vessel.referenceTransformId;
                if (parent != dockedPart)
                {
                    dockedPart.Undock(docked_vessel);
                    dockedPart.attachNodes.Remove(grappleNode);
                }
                else
                {
                    part.Undock(this_vessel);
                    part.attachNodes.Remove(grappleNode);
                }
                grappleNode.attachedPart = null;
                grappleNode.owner        = null;
                part.fuelLookupTargets.Remove(dockedPart);
                dockedPart.fuelLookupTargets.Remove(part);
                GameEvents.onPartFuelLookupStateChange.Fire(new GameEvents.HostedFromToAction <bool, Part>(true, part, dockedPart));
                AddForceAlongGrapples(dockedPart, -GrappleForce);
                if (old_vessel == FlightGlobals.ActiveVessel)
                {
                    if (old_vessel[referenceTransformId] == null)
                    {
                        StartCoroutine(CallbackUtil.DelayedCallback(1, () => FlightGlobals.ForceSetActiveVessel(vessel)));
                    }
                }
            }
            if (armAnimator != null)
            {
                armAnimator.Close();
            }
            state = State.Idle;
            update_part_menu();
        }