当前位置: 首页>>代码示例>>C#>>正文


C# Part.RemoveCrewmember方法代码示例

本文整理汇总了C#中Part.RemoveCrewmember方法的典型用法代码示例。如果您正苦于以下问题:C# Part.RemoveCrewmember方法的具体用法?C# Part.RemoveCrewmember怎么用?C# Part.RemoveCrewmember使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Part的用法示例。


在下文中一共展示了Part.RemoveCrewmember方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DumpCrew

        internal static void DumpCrew(Part part)
        {
            if (!part.vessel.IsRecoverable) return;
              while (part.protoModuleCrew.Count > 0)
              {
            ProtoCrewMember kerbal = part.protoModuleCrew.FirstOrDefault();
            if (kerbal != null)
            {
              part.RemoveCrewmember(kerbal);
              kerbal.rosterStatus = ProtoCrewMember.RosterStatus.Available;

              if (kerbal.seat != null)
            kerbal.seat.SpawnCrew();
            }
              }
        }
开发者ID:Kerbas-ad-astra,项目名称:ShipManifest,代码行数:16,代码来源:SMPart.cs

示例2: delCrew

 //remove crew from a part
 public static List<ProtoCrewMember> delCrew(Part p, List<ProtoCrewMember> crew)
 {
     var deleted = new List<ProtoCrewMember>();
     if(p.CrewCapacity == 0 || p.protoModuleCrew.Count == 0) return deleted;
     foreach(ProtoCrewMember kerbal in crew)
     {
         ProtoCrewMember part_kerbal = p.protoModuleCrew.Find(k => k.name == kerbal.name);
         if(part_kerbal != null)
         {
             deleted.Add(part_kerbal);
             p.RemoveCrewmember(part_kerbal);
             part_kerbal.seat = null;
         }
     }
     return deleted;
 }
开发者ID:pjslauta,项目名称:hangar,代码行数:17,代码来源:CrewTransfer.cs

示例3: RemoveCrew

        private void RemoveCrew(ProtoCrewMember member, Part part, bool fireVesselUpdate)
        {
            part.RemoveCrewmember(member);
            member.seat = null;
            member.rosterStatus = ProtoCrewMember.RosterStatus.Available;

            if (fireVesselUpdate)
                ManifestBehaviour.FireVesselUpdated();
        }
开发者ID:sarbian,项目名称:CrewManifest,代码行数:9,代码来源:ManifestController.cs

示例4: RemoveCrewMember

 internal static void RemoveCrewMember(ProtoCrewMember pKerbal, Part part)
 {
   part.RemoveCrewmember(pKerbal);
   pKerbal.rosterStatus = ProtoCrewMember.RosterStatus.Available;
   SMAddon.FireEventTriggers();
 }
开发者ID:Shavenbeard,项目名称:ShipManifest,代码行数:6,代码来源:TransferCrew.cs

示例5: RevertCrewTransfer

    internal static void RevertCrewTransfer(ProtoCrewMember fromCrew, Part fromPart, Part toPart)
    {
      // If a Stock crew Transfer occurred, let's revert the crew and activate the SM transfer mechanism...
      toPart.RemoveCrewmember(fromCrew);
      fromPart.AddCrewmember(fromCrew);
      if (fromCrew.seat != null)
        fromCrew.seat.SpawnCrew();

      SMAddon.smController.RespawnCrew();
    }
开发者ID:Shavenbeard,项目名称:ShipManifest,代码行数:10,代码来源:TransferCrew.cs

示例6: RemoveCrew

 private void RemoveCrew(ProtoCrewMember member, Part part)
 {
     part.RemoveCrewmember(member);
     member.rosterStatus = ProtoCrewMember.RosterStatus.Available;
 }
开发者ID:ragzilla,项目名称:ShipManifest,代码行数:5,代码来源:ManifestController.cs

示例7: unloadCrew

 private void unloadCrew(ProtoCrewMember crew, Part p, bool savereturn)
 {
     //print("rem " + crew.name);
     p.RemoveCrewmember(crew);
     //crew.seat.DespawnCrew();
     //crew.seat = null;
     if (savereturn)
     {
         crew.rosterStatus = ProtoCrewMember.RosterStatus.Available;
     }
     else
     {
         if (HighLogic.CurrentGame.Parameters.Difficulty.MissingCrewsRespawn)
         {
             crew.rosterStatus = ProtoCrewMember.RosterStatus.Missing;
         }
         else
         {
             crew.rosterStatus = ProtoCrewMember.RosterStatus.Dead;
         }
     }
 }
开发者ID:PrivateFlip,项目名称:RoutineMissionManager,代码行数:22,代码来源:Routine.cs

示例8: CrewTest

        private void CrewTest(int REASON, Part p, double l)
        {
            int CUR_CWLS = IFICWLS;
            CUR_CWLS += (Convert.ToInt16(l) * 10);
            float rand;
            ProtoCrewMember iCrew;
            for (int i = 0; i < p.protoModuleCrew.Count; i++)
            {
            rand = UnityEngine.Random.Range(0.0f, 100.0f);
            IFIDebug.IFIMess("!!!!!!!!");
            IFIDebug.IFIMess("Testing Crew Death Crewmember=" + p.protoModuleCrew[i].name);
            IFIDebug.IFIMess("Crew Death Chance = " + Convert.ToString(CUR_CWLS));
            IFIDebug.IFIMess("Crew Death Roll = " + Convert.ToString(rand));
            IFIDebug.IFIMess("!!!!!!!!");

            if (CUR_CWLS > rand)
            {
            iCrew = p.protoModuleCrew[i];
            p.RemoveCrewmember(iCrew);// Remove crew from part
            iCrew.Die();  // Kill crew after removal or death will reset to active.
            IFIDebug.IFIMess(p.vessel.vesselName + " POD Kerbal Killed due to no LS - " + iCrew.name);
            string message = ""; message += p.vessel.vesselName + "\n\n"; message += iCrew.name + "\n Was killed due to ::";
                    message += "No Life Support Remaining";
                    message += "::";
            MessageSystem.Message m = new MessageSystem.Message("Kerbal Death from LifeSupport System", message, MessageSystemButton.MessageButtonColor.RED, MessageSystemButton.ButtonIcons.ALERT);
            MessageSystem.Instance.AddMessage(m);
            }
            }
        }
开发者ID:Will565,项目名称:IFI-Life-Support,代码行数:29,代码来源:LifeSupportTracking.cs


注:本文中的Part.RemoveCrewmember方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。