本文整理汇总了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();
}
}
}
示例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;
}
示例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();
}
示例4: RemoveCrewMember
internal static void RemoveCrewMember(ProtoCrewMember pKerbal, Part part)
{
part.RemoveCrewmember(pKerbal);
pKerbal.rosterStatus = ProtoCrewMember.RosterStatus.Available;
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: RemoveCrew
private void RemoveCrew(ProtoCrewMember member, Part part)
{
part.RemoveCrewmember(member);
member.rosterStatus = ProtoCrewMember.RosterStatus.Available;
}
示例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;
}
}
}
示例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);
}
}
}