コード例 #1
0
 void spawn_space_keeper()
 {
     if (animator != null && !SpawnManager.SpawnSpaceEmpty)
     {
         animator.Open();
     }
 }
コード例 #2
0
 protected override void on_anchor_attached()
 {
     base.on_anchor_attached();
     if (Animator != null)
     {
         Animator.Open();
     }
 }
コード例 #3
0
 public override void OnStart(StartState state)
 {
     base.OnStart(state);
     //get grapple transforms
     foreach (var grapple in Utils.ParseLine(GrappleTransforms, Utils.Whitespace))
     {
         grapple_transforms.AddRange(part.FindModelTransforms(grapple));
     }
     //initialize animators
     armAnimator = part.GetAnimator <MultiAnimator>(ArmAnimatorID);
     fixAnimator = part.GetAnimator <MultiAnimator>(FixAnimatorID);
     if (IsDocked)
     {
         var dockedPart = vessel[dockedPartUId];
         if (dockedPart == part.parent)
         {
             setup_grapple_node(dockedPart, part);
         }
         else
         {
             setup_grapple_node(dockedPart, dockedPart);
         }
     }
     else if (this.state > State.Armed)
     {
         this.state = State.Armed;
     }
     if (this.state != State.Idle)
     {
         if (armAnimator != null)
         {
             armAnimator.Open();
         }
     }
     if (this.state == State.Fixed)
     {
         if (fixAnimator != null)
         {
             fixAnimator.Open();
         }
     }
     update_part_menu();
     //initialize socket
     if (GrappleEnergyConsumption > 0)
     {
         socket = part.CreateSocket();
     }
 }
コード例 #4
0
 public override void OnAwake()
 {
     base.OnAwake();
     warning         = gameObject.AddComponent <SimpleWarning>();
     warning.Message = "This will fix the grapple permanently. " +
                       "You will not be able to decouple it ever again. " +
                       "Are you sure you want to continue?";
     warning.yesCallback = () =>
     {
         if (fixAnimator != null)
         {
             fixAnimator.Open();
         }
         StartCoroutine(delayed_disable_decoupling());
     };
     GameEvents.onPartJointBreak.Add(onPartJointBreak);
 }