本文整理汇总了C#中Vessel.HasCommandStation方法的典型用法代码示例。如果您正苦于以下问题:C# Vessel.HasCommandStation方法的具体用法?C# Vessel.HasCommandStation怎么用?C# Vessel.HasCommandStation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vessel
的用法示例。
在下文中一共展示了Vessel.HasCommandStation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProtoSignalProcessor
public ProtoSignalProcessor(ProtoPartModuleSnapshot ppms, Vessel v)
{
mVessel = v;
Powered = ppms.GetBool("IsRTPowered");
IsCommandStation = Powered && v.HasCommandStation() && v.GetVesselCrew().Count >= 6;
RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2})", Powered, v.HasCommandStation(), v.GetVesselCrew().Count);
}
示例2: ProtoSignalProcessor
public ProtoSignalProcessor(ProtoPartModuleSnapshot ppms, Vessel v)
{
Vessel = v;
Powered = ppms.GetBool("IsRTPowered");
// get the crew count from the vessel
var crewcount = v.GetVesselCrew().Count;
// when the crew count is equal to 0 then look into the protoVessel
if (crewcount == 0 && v.protoVessel.GetVesselCrew() != null)
crewcount = v.protoVessel.GetVesselCrew().Count;
RTLog.Notify("ProtoSignalProcessor crew count of {0} is {1}", v.vesselName, crewcount);
int ppmsMinCrew;
//try to get the RTCommandMinCrew value in the ProtoPartModuleSnapshot
if (ppms.GetInt("RTCommandMinCrew", out ppmsMinCrew))
{
IsCommandStation = Powered && v.HasCommandStation() && crewcount >= ppmsMinCrew;
RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2}/{3})",
Powered, v.HasCommandStation(), crewcount, ppmsMinCrew);
}
else
{
// there was no RTCommandMinCrew member in the ProtoPartModuleSnapshot
IsCommandStation = false;
RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2})",
Powered, v.HasCommandStation(), crewcount);
}
}
示例3: ProtoSignalProcessor
public ProtoSignalProcessor(ProtoPartModuleSnapshot ppms, Vessel v)
{
mVessel = v;
Powered = ppms.GetBool("IsRTPowered");
// get the crew count from the vessel
int crewcount = v.GetVesselCrew().Count;
// when the crewcount is eq 0 than look into the protoVessel
if (crewcount == 0 && v.protoVessel.GetVesselCrew() != null)
crewcount = v.protoVessel.GetVesselCrew().Count;
RTLog.Notify("ProtoSignalProcessor crew count of {0} is {1}", v.vesselName, crewcount);
try {
IsCommandStation = Powered && v.HasCommandStation() && crewcount >= ppms.GetInt("RTCommandMinCrew");
RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2}/{3})",
Powered, v.HasCommandStation(), crewcount, ppms.GetInt("RTCommandMinCrew"));
} catch (ArgumentException argexeception) {
// I'm assuming this would get thrown by ppms.GetInt()... do the other functions have an exception spec?
IsCommandStation = false;
RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2})",
Powered, v.HasCommandStation(), crewcount);
RTLog.Notify("ProtoSignalProcessor ", argexeception);
}
}
示例4: ProtoSignalProcessor
public ProtoSignalProcessor(ProtoPartModuleSnapshot ppms, Vessel v)
{
Vessel = v;
Powered = ppms.GetBool("IsRTPowered");
CommandStation = Powered && v.HasCommandStation() && v.GetVesselCrew().Count >= 6;
RTUtil.Log("ProtoSignalProcessor: Powered: {0}, CommandStation: {1}, Crew: {2}",
Powered, v.HasCommandStation(), v.GetVesselCrew().Count);
}
示例5: ProtoSignalProcessor
public ProtoSignalProcessor(ProtoPartModuleSnapshot ppms, Vessel v)
{
Vessel = v;
Powered = ppms.GetBool("IsPowered");
CommandStation = Powered && v.HasCommandStation() && Vessel.GetVesselCrew().Count >= 6;
}