本文整理汇总了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();
}
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
}
}
示例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();
}
示例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();
}
}
}
示例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);
}
示例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;
}
示例11: AddCrew
private void AddCrew(Part part, ProtoCrewMember kerbal)
{
part.AddCrewmember(kerbal);
kerbal.rosterStatus = ProtoCrewMember.RosterStatus.ASSIGNED;
if (kerbal.seat != null)
kerbal.seat.SpawnCrew();
}
示例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();
}