Table of Contents

Class TimeWarp

Namespace
KSP.Sim.impl
Assembly
Assembly-CSharp.dll
public class TimeWarp : IFixedUpdate, IPriorityOverride
Inheritance
TimeWarp
Implements
Inherited Members
Extension Methods

Constructors

TimeWarp(IUniverseTime, IViewController, IMessageCenter)

public TimeWarp(IUniverseTime universeTime, IViewController viewController, IMessageCenter messageCenter)

Parameters

universeTime IUniverseTime
viewController IViewController
messageCenter IMessageCenter

Fields

DEFAULT_MAX_WARP_TO

public const float DEFAULT_MAX_WARP_TO = 10

Field Value

float

DEFAULT_MIN_WARP_TO

public const float DEFAULT_MIN_WARP_TO = 1

Field Value

float

MAX_PHYSICS_WARP_RATE_INDEX

public const int MAX_PHYSICS_WARP_RATE_INDEX = 2

Field Value

int

NO_TIME_WARP_INDEX

public const int NO_TIME_WARP_INDEX = 0

Field Value

int

Properties

CurrentRate

public float CurrentRate { get; }

Property Value

float

CurrentRateIndex

public int CurrentRateIndex { get; }

Property Value

int

IsAutoWarpEngaged

public bool IsAutoWarpEngaged { get; }

Property Value

bool

IsPhysicsTimeWarp

public bool IsPhysicsTimeWarp { get; }

Property Value

bool

IsWarping

public bool IsWarping { get; }

Property Value

bool

Methods

CancelAutoWarp()

public void CancelAutoWarp()

DecreaseTimeWarp()

public bool DecreaseTimeWarp()

Returns

bool

GetMaxRateIndex(bool, out bool)

public int GetMaxRateIndex(bool includeInterstellar, out bool isPhysicsTimeWarp)

Parameters

includeInterstellar bool
isPhysicsTimeWarp bool

Returns

int

GetNextTickTimescaleMultiplier()

public float GetNextTickTimescaleMultiplier()

Returns

float

GetRate(int)

public float GetRate(int rateIndex)

Parameters

rateIndex int

Returns

float

GetWarpRates()

public TimeWarp.TimeWarpLevel[] GetWarpRates()

Returns

TimeWarpLevel[]

IncreaseTimeWarp()

public bool IncreaseTimeWarp()

Returns

bool

SetIsPaused(bool)

public void SetIsPaused(bool isPaused)

Parameters

isPaused bool

SetRateIndex(int, bool)

public bool SetRateIndex(int rateIndex, bool instant)

Parameters

rateIndex int
instant bool

Returns

bool

StopTimeWarp(bool)

public void StopTimeWarp(bool instant = false)

Parameters

instant bool

WarpTo(double, float, float)

public void WarpTo(double targetUniversalTime, float minTimeWarpRate = 1, float maxTimeWarpRate = 10)

Parameters

targetUniversalTime double
minTimeWarpRate float
maxTimeWarpRate float

Events

PauseStateChanged

public event Action<bool> PauseStateChanged

Event Type

Action<bool>

RateChanged

public event Action<float> RateChanged

Event Type

Action<float>

RateIndexChanged

public event Action<int> RateIndexChanged

Event Type

Action<int>