C# 클래스 kOS.Safe.Execution.YieldFinishedGameTimer

A kind of YieldFinishedDetector for use when you just want a 'dumb' timer based on the KSP game clock (note: uses the game's notion of simulated time rather than the real-time wall clock. I.e. the timer is frozen for the duration of a FixedUpdate, and doesn't move at all if the game is paused, etc.).

You'd have to make a slightly different derivative of YieldFinishedDetector in order to base your timer on the out-of-game wall clock.
상속: YieldFinishedDetector
파일 보기 프로젝트 열기: KSP-KOS/KOS

공개 메소드들

메소드 설명
Begin ( SafeSharedObjects shared ) : void

Need to track the shared object in order to query current game time. The timer starts "counting" from where the clock was when the CPU calls this (which it does as soon as you do a YieldProgram() call.)

IsFinished ( ) : bool

Return true if the timer ran out, or false if the timer has not run out.

YieldFinishedGameTimer ( double duration )

Make a new timer that will expire after the given number of seconds have passed in game-clock time (not real-world time).

메소드 상세

Begin() 공개 메소드

Need to track the shared object in order to query current game time. The timer starts "counting" from where the clock was when the CPU calls this (which it does as soon as you do a YieldProgram() call.)
public Begin ( SafeSharedObjects shared ) : void
shared SafeSharedObjects
리턴 void

IsFinished() 공개 메소드

Return true if the timer ran out, or false if the timer has not run out.
public IsFinished ( ) : bool
리턴 bool

YieldFinishedGameTimer() 공개 메소드

Make a new timer that will expire after the given number of seconds have passed in game-clock time (not real-world time).
public YieldFinishedGameTimer ( double duration )
duration double