本文整理汇总了C#中Vessel.IsInAtmosphere方法的典型用法代码示例。如果您正苦于以下问题:C# Vessel.IsInAtmosphere方法的具体用法?C# Vessel.IsInAtmosphere怎么用?C# Vessel.IsInAtmosphere使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vessel
的用法示例。
在下文中一共展示了Vessel.IsInAtmosphere方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetEvaAction
public static EvaAction GetEvaAction(ProtoCrewMember kerbal, Vessel fromVessel)
{
if (fromVessel != null)
{
bool atmosphere = fromVessel.IsInAtmosphere();
bool oxygen = fromVessel.IsInAtmosphereWithOxygen();
if (Log.IsLogable(Log.LEVEL.DETAIL)) Log.Detail("creating EVA action for kerbal " + kerbal.name + " in atmosphere:" + atmosphere + ", oxygen:" + oxygen);
if (atmosphere && oxygen)
{
return ActionPool.ACTION_EVA_OXYGEN;
}
else if (atmosphere && ! oxygen)
{
return ActionPool.ACTION_EVA_INATM;
}
else if (!atmosphere)
{
return ActionPool.ACTION_EVA_NOATM;
}
else
{
Log.Warning("unexpected EVA situation");
return ActionPool.ACTION_EVA_NOATM;
}
}
else
{
Log.Warning("no vessel for kerbal "+kerbal.name+" on EVA");
return ActionPool.ACTION_EVA_NOATM;
}
}
示例2: VesselState
public VesselState(Vessel vessel)
{
this.timestamp = Planetarium.GetUniversalTime();
this.Origin = vessel;
this.MainBody = vessel.mainBody;
this.IsLaunch = false;
this.IsLanded = vessel.Landed;
this.IsPrelaunch = (vessel.situation == Vessel.Situations.PRELAUNCH);
this.IsEVA = vessel.isEVA;
this.HasFlagPlanted = false;
this.Situation = vessel.situation;
this.InOrbit = vessel.isInStableOrbit();
this.ApA = vessel.orbit.ApA;
this.ApR = vessel.orbit.ApR;
this.PeA = vessel.orbit.PeA;
this.PeR = vessel.orbit.PeR;
this.atmDensity = vessel.atmDensity;
this.MissionTime = vessel.missionTime;
this.LaunchTime = vessel.launchTime;
this.movedOnSurface = false;
this.altitude = vessel.altitude;
this.IsInAtmosphere = vessel.IsInAtmosphere();
}