本文整理汇总了C#中Vessel.StageHasSolidEngine方法的典型用法代码示例。如果您正苦于以下问题:C# Vessel.StageHasSolidEngine方法的具体用法?C# Vessel.StageHasSolidEngine怎么用?C# Vessel.StageHasSolidEngine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vessel
的用法示例。
在下文中一共展示了Vessel.StageHasSolidEngine方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateSettings
public void CalculateSettings(Vessel vessel,bool UseBest=false)
{
stagestats.RequestUpdate(this);
double TWR = 0;
for (int i = stagestats.atmoStats.Length - 1; i >= 0; i--)
{
double stagetwr = stagestats.atmoStats[i].StartTWR(vessel.mainBody.GeeASL);
if (stagetwr > 0)
{
if (vessel.StageHasSolidEngine(i))
TWR = (stagetwr + stagestats.atmoStats[i].MaxTWR(vessel.mainBody.GeeASL))/2.3;
else
TWR = stagetwr;
break;
}
}
if (TWR > 1.2)
{
TWR -= 1.2;
TurnAngle = Mathf.Clamp((float)(10 + TWR * 9), 10, 80);
StartSpeed = Mathf.Clamp((float)(100 - TWR * 45), 10, 100);
}
double guessTurn, guessSpeed;
if (UseBest && launchdb.BestSettings(out guessTurn,out guessSpeed))
{
StartSpeed = guessSpeed;
TurnAngle = guessTurn;
}
else if (launchdb.GuessSettings(out guessTurn, out guessSpeed))
{
StartSpeed = guessSpeed;
TurnAngle = guessTurn;
}
APTimeFinish = 40;
APTimeStart = 40;
Sensitivity = 0.2;
if (vessel.mainBody.atmosphereDepth > 0)
DestinationHeight = vessel.mainBody.atmosphereDepth + 10000;
else
DestinationHeight = vessel.mainBody.timeWarpAltitudeLimits[1] + 10000;
DestinationHeight /= 1000;
Roll = -90;
Inclination = 0;
PressureCutoff = 2500;
SaveParameters();
}