本文整理汇总了C#中Vessel.CriticalHeatPart方法的典型用法代码示例。如果您正苦于以下问题:C# Vessel.CriticalHeatPart方法的具体用法?C# Vessel.CriticalHeatPart怎么用?C# Vessel.CriticalHeatPart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vessel
的用法示例。
在下文中一共展示了Vessel.CriticalHeatPart方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateMap
public void UpdateMap(Vessel vessel)
{
double yScale;
if (vessel.mainBody.atmosphere)
yScale = vessel.mainBody.atmosphereDepth;
else
yScale = turner.DestinationHeight * 1000;
double MetersPerPixel = yScale / texture.height;
double x = turner.HorizontalDistance / MetersPerPixel % texture.width;
double y = vessel.altitude / MetersPerPixel % texture.height;
float red = (float)(vessel.CriticalHeatPart().CriticalHeat());
float green = (float)turner.vesselState.drag / 5;
float blue = (float)(turner.vesselState.thrustCurrent / turner.MaxThrust);
texture.SetPixel((int)x, (int)y, new Color(red, green, blue));
texture.Apply();
}
示例2: CalculateLosses
void CalculateLosses(Vessel vessel)
{
double fwdAcceleration = Vector3d.Dot(vessel.acceleration, vesselState.forward.normalized);
double GravityDrag = Vector3d.Dot(vesselState.gravityForce, -vessel.obt_velocity.normalized);
double TimeInterval = Time.time - FlyTimeInterval;
FlyTimeInterval = Time.time;
HorizontalDistance += Vector3d.Exclude(vesselState.up, vesselState.orbitalVelocity).magnitude * TimeInterval;
VelocityLost += ((vesselState.thrustCurrent / vesselState.mass) - fwdAcceleration) * TimeInterval;
DragLoss += vesselState.drag * TimeInterval;
GravityDragLoss += GravityDrag * TimeInterval;
double VectorDrag = vesselState.thrustCurrent - Vector3d.Dot(vesselState.thrustVectorLastFrame, vessel.obt_velocity.normalized);
VectorDrag = VectorDrag / vesselState.mass;
VectorLoss += VectorDrag * TimeInterval;
TotalBurn += vesselState.thrustCurrent / vesselState.mass * TimeInterval;
double GravityDragLossAtAp = GravityDragLoss + vessel.obt_velocity.magnitude - vessel.orbit.getOrbitalVelocityAtUT(vessel.orbit.timeToAp + Planetarium.GetUniversalTime()).magnitude;
TotalLoss = DragLoss + GravityDragLossAtAp + VectorLoss;
if (vessel.CriticalHeatPart().CriticalHeat() > MaxHeat)
MaxHeat = vessel.CriticalHeatPart().CriticalHeat();
launchdb.RecordLaunch();
Message = string.Format(
@"Air Drag: {0:0.00}m/s²
GravityDrag: {1:0.00}m/s²
Thrust Vector Drag: {5:0.00}m/s²
Air Drag Loss: {2:0.00}m/s
Gravity Drag Loss: {3:0.00} -> {4:0.00}m/s (at AP)
Total Vector Loss: {6:0.00}m/s
Total Loss: {7:0.00}m/s
Total Burn: {8:0.0}",
vesselState.drag,
GravityDrag,
DragLoss,
GravityDragLoss, GravityDragLossAtAp,
VectorDrag,
VectorLoss,
DragLoss + GravityDragLossAtAp + VectorLoss,
TotalBurn
);
}