C# 클래스 BetterBurnTime.ImpactTracker

상속: UnityEngine.MonoBehaviour
파일 보기 프로젝트 열기: KSPSnark/BetterBurnTime 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AsInteger int
CalculateTimeToImpact double
CalculateVesselHeight double
ChooseParts List
GetVesselHeight double
Recalculate bool
Reset void

공개 메소드들

메소드 설명
LateUpdate ( ) : void

Called on each frame.

Start ( ) : void

Here when the add-on loads upon flight start.

비공개 메소드들

메소드 설명
AsInteger ( double value ) : int
CalculateTimeToImpact ( Vessel vessel, string &verb, double &impactSpeed ) : double

Gets the time in seconds until the vessel will impact the surface. Returns positive infinity if it's not applicable.

CalculateVesselHeight ( Vessel vessel, Part &lowestPart ) : double

This method calculates the height in meters from the ship's "current point" to its lowest extent. Subtracting this number from vessel.altitude gives the altitude of the bottom of the ship, in the ship's current orientation. Thank you to SirDiazo's mod Landing Height for code that inspired this section. Landing Height: https://kerbalstuff.com/mod/458/Landing%20Height It's notable that this code is somewhat simplified from SirDiazo's because it's solving a simpler problem (i.e. it's saving computation by giving more of an approximation). This is a moderately expensive calculation to perform, so use sparingly (i.e. not on every frame).

ChooseParts ( Vessel vessel ) : List
GetVesselHeight ( Part &currentLowestPart ) : double
Recalculate ( ) : bool

Do necessary calculations around impact tracking. Returns true if there's anything to display.

Reset ( ) : void

메소드 상세

LateUpdate() 공개 메소드

Called on each frame.
public LateUpdate ( ) : void
리턴 void

Start() 공개 메소드

Here when the add-on loads upon flight start.
public Start ( ) : void
리턴 void