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


C# Part.AddCrewmember方法代码示例

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


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

示例1: FillCrew

 internal static void FillCrew(Part part)
 {
     //Utilities.LogMessage(string.Format("Entering Fill Crew with part {0}", part.partInfo.name), Utilities.LogType.Info, true);
       if (IsCrewFull(part)) return;
       while (part.CrewCapacity > Utilities.GetPartCrewCount(part))
       {
     ProtoCrewMember kerbal = HighLogic.CurrentGame.CrewRoster.GetNextOrNewKerbal();
     part.AddCrewmember(kerbal);
     //Utilities.LogMessage(string.Format("Filling crew in part {0}", part.partInfo.name), Utilities.LogType.Info, true);
     if (kerbal.seat != null)
       kerbal.seat.SpawnCrew();
       }
 }
开发者ID:Kerbas-ad-astra,项目名称:ShipManifest,代码行数:13,代码来源:SMPart.cs

示例2: addCrew

 //add some crew to a part
 public static bool addCrew(Part p, List<ProtoCrewMember> crew)
 {
     if(crew.Count == 0) return false;
     if(p.CrewCapacity <= p.protoModuleCrew.Count) return false;
     while(p.protoModuleCrew.Count < p.CrewCapacity && crew.Count > 0)
     {
         var kerbal = crew[0];
         p.AddCrewmember(kerbal);
         if(kerbal.seat != null)
             kerbal.seat.SpawnCrew();
         crew.RemoveAt(0);
     }
     return true;
 }
开发者ID:pjslauta,项目名称:hangar,代码行数:15,代码来源:CrewTransfer.cs

示例3: AddCrew

        private void AddCrew(Part part, ProtoCrewMember kerbal, bool fireVesselUpdate)
        {
            part.AddCrewmember(kerbal);

            kerbal.rosterStatus = ProtoCrewMember.RosterStatus.Assigned;
            if (kerbal.seat != null)
                kerbal.seat.SpawnCrew();

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

示例4: AddCrewMember

 internal static void AddCrewMember(ProtoCrewMember pKerbal, Part part)
 {
   part.AddCrewmember(pKerbal);
   if (part.internalModel != null)
   {
     if (pKerbal.seat != null)
       pKerbal.seat.SpawnCrew();
   }
   pKerbal.rosterStatus = ProtoCrewMember.RosterStatus.Assigned;
   SMAddon.FireEventTriggers();
 }
开发者ID:Shavenbeard,项目名称:ShipManifest,代码行数:11,代码来源: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: FillPartCrew

        private void FillPartCrew(int count, Part part)
        {
            if (!CrewPartIsFull(part))
            {
                for (int i = 0; i < part.CrewCapacity && i < count; i++)
                {
                    ProtoCrewMember kerbal = HighLogic.CurrentGame.CrewRoster.GetNextOrNewKerbal();
                    part.AddCrewmember(kerbal);

                    if (kerbal.seat != null)
                        kerbal.seat.SpawnCrew();
                }
            }
        }
开发者ID:JPLRepo,项目名称:RosterManager,代码行数:14,代码来源:RMAddon.cs

示例7: AddCrew

 public void AddCrew(ProtoCrewMember kerbal, Part part)
 {
     part.AddCrewmember(kerbal);
     kerbal.rosterStatus = ProtoCrewMember.RosterStatus.Assigned;
     if (part.internalModel != null)
     {
         if (kerbal.seat != null)
             kerbal.seat.SpawnCrew();
     }
     ShipManifestBehaviour.FireEventTriggers();
 }
开发者ID:ragzilla,项目名称:ShipManifest,代码行数:11,代码来源:ManifestController.cs

示例8: FillPartCrew

    internal static void FillPartCrew(Part part)
    {
      if (part.vessel.IsRecoverable && !IsPartCrewFull(part))
      {
        while (part.CrewCapacity > Utilities.GetPartCrewCount(part))
        {
          ProtoCrewMember kerbal = HighLogic.CurrentGame.CrewRoster.GetNextOrNewKerbal();
          part.AddCrewmember(kerbal);

          if (kerbal.seat != null)
            kerbal.seat.SpawnCrew();
        }
      }
    }
开发者ID:Shavenbeard,项目名称:ShipManifest,代码行数:14,代码来源:SMController.cs

示例9: AddCrew

        private bool AddCrew(Part p, ProtoCrewMember kerbal)
        {
            p.AddCrewmember(kerbal);

            kerbal.rosterStatus = ProtoCrewMember.RosterStatus.Assigned;

            if (kerbal.seat != null)
                kerbal.seat.SpawnCrew();

            return (true);
        }
开发者ID:PrivateFlip,项目名称:RoutineMissionManager,代码行数:11,代码来源:Routine.cs

示例10: MoveKerbal

 private void MoveKerbal(Part source, Part target, ProtoCrewMember kerbal)
 {
     RemoveCrew(kerbal, source);
     target.AddCrewmember(kerbal);
     if (kerbal.seat != null)
         kerbal.seat.SpawnCrew();
     kerbal.rosterStatus = ProtoCrewMember.RosterStatus.ASSIGNED;
 }
开发者ID:vXSovereignXv,项目名称:CrewManifest,代码行数:8,代码来源:ManifestController.cs

示例11: AddCrew

 private void AddCrew(Part part, ProtoCrewMember kerbal)
 {
     part.AddCrewmember(kerbal);
     kerbal.rosterStatus = ProtoCrewMember.RosterStatus.ASSIGNED;
     if (kerbal.seat != null)
         kerbal.seat.SpawnCrew();
 }
开发者ID:vXSovereignXv,项目名称:CrewManifest,代码行数:7,代码来源:ManifestController.cs

示例12: addCrew

 private void addCrew(Part part, CrewMember crew)  //from kerbal crew manifest by vXSovereignXv
 {
     ProtoCrewMember kerbal = new ProtoCrewMember();
     kerbal.name = crew.Name;
     kerbal.isBadass = crew.isBadass;
     kerbal.stupidity = crew.Stupidity;
     kerbal.courage = crew.Courage;
     kerbal.rosterStatus = ProtoCrewMember.RosterStatus.ASSIGNED;
     //kerbal.seat = null;
     //kerbal.seatIdx = -1;
     part.AddCrewmember(kerbal);        
     if (kerbal.seat != null)
         kerbal.seat.SpawnCrew();
 }
开发者ID:KevinMilcz,项目名称:Firespitter,代码行数:14,代码来源:FScrewTransfer.cs


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