Class ViewController
- Namespace
- KSP.Sim.impl
- Assembly
- Assembly-CSharp.dll
public class ViewController : IViewController, IUpdate, IPriorityOverride
- Inheritance
-
ViewController
- Implements
-
- Inherited Members
-
- Extension Methods
-
Constructors
public ViewController(IKeyboardInputDriver keyboardInput, IInputLockManager inputLockManager, SpaceSimulation spaceSimulation, IModelViewMap modelViewMap, UniverseModel universeModel, IScriptEnvironment universeScriptEnvironment)
Parameters
keyboardInput IKeyboardInputDriver
inputLockManager IInputLockManager
spaceSimulation SpaceSimulation
modelViewMap IModelViewMap
universeModel UniverseModel
universeScriptEnvironment IScriptEnvironment
Properties
CanSwitchActiveVessel
public bool CanSwitchActiveVessel { get; }
Property Value
- bool
DataProvider
public ViewDataProvider DataProvider { get; }
Property Value
- ViewDataProvider
FlightObserver
public IUniverseObserver FlightObserver { get; set; }
Property Value
- IUniverseObserver
public GameState GameStateBeforeEscMenu { get; }
Property Value
- GameState
IsNormalTime
public bool IsNormalTime { get; }
Property Value
- bool
IsPaused
public bool IsPaused { get; }
Property Value
- bool
IsPendingVehicleChange
public bool IsPendingVehicleChange { get; }
Property Value
- bool
TimeWarp
public TimeWarp TimeWarp { get; }
Property Value
- TimeWarp
Universe
public UniverseModel Universe { get; }
Property Value
- UniverseModel
VesselsInRange
public IReadOnlyList<VesselComponent> VesselsInRange { get; }
Property Value
- IReadOnlyList<VesselComponent>
climbSystem
public ClimbSystem climbSystem { get; }
Property Value
- ClimbSystem
public CutsceneTools cutsceneTools { get; }
Property Value
- CutsceneTools
public EVAInputHandler evaInputHandler { get; }
Property Value
- EVAInputHandler
public FlightInputHandler flightInputHandler { get; }
Property Value
- FlightInputHandler
public IInputLockManager inputLockManager { get; }
Property Value
- IInputLockManager
interactSystem
public InteractSystem interactSystem { get; }
Property Value
- InteractSystem
public IKeyboardInputDriver keyboardInput { get; }
Property Value
- IKeyboardInputDriver
patchedConicsAttached
public bool patchedConicsAttached { get; set; }
Property Value
- bool
propertyViewHandle
public PropertyViewHandle propertyViewHandle { get; }
Property Value
- PropertyViewHandle
ready
public bool ready { get; }
Property Value
- bool
universalTime
public double universalTime { get; }
Property Value
- double
Methods
CanObserverLeaveTheActiveVessel()
public bool CanObserverLeaveTheActiveVessel()
Returns
- bool
CreatePlayerColony(string, LegacySerializedColony, SerializedLocation, Action<IVehicle>)
public bool CreatePlayerColony(string optionalGuid, LegacySerializedColony colony, SerializedLocation location, Action<IVehicle> creationCallback)
Parameters
optionalGuid string
colony LegacySerializedColony
location SerializedLocation
creationCallback Action<IVehicle>
Returns
- bool
GetActiveSimVessel(bool)
public VesselComponent GetActiveSimVessel(bool requireValidInSim = true)
Parameters
requireValidInSim bool
Returns
- VesselComponent
GetActiveVehicle(bool)
public IVehicle GetActiveVehicle(bool requireValidInSim = true)
Parameters
requireValidInSim bool
Returns
- IVehicle
GetBehaviorIfLoaded(CelestialBodyComponent)
public CelestialBodyBehavior GetBehaviorIfLoaded(CelestialBodyComponent celestialBody)
Parameters
celestialBody CelestialBodyComponent
Returns
- CelestialBodyBehavior
GetBehaviorIfLoaded(CrewMemberComponent)
public CrewMemberBehavior GetBehaviorIfLoaded(CrewMemberComponent crew)
Parameters
crew CrewMemberComponent
Returns
- CrewMemberBehavior
GetBehaviorIfLoaded(KerbalComponent)
public KerbalBehavior GetBehaviorIfLoaded(KerbalComponent kerbal)
Parameters
kerbal KerbalComponent
Returns
- KerbalBehavior
GetBehaviorIfLoaded(PartComponent)
public PartBehavior GetBehaviorIfLoaded(PartComponent partComponent)
Parameters
partComponent PartComponent
Returns
- PartBehavior
GetBehaviorIfLoaded(ThermalComponent)
public ThermalBehavior GetBehaviorIfLoaded(ThermalComponent thermalComponent)
Parameters
thermalComponent ThermalComponent
Returns
- ThermalBehavior
GetBehaviorIfLoaded(VesselComponent)
public VesselBehavior GetBehaviorIfLoaded(VesselComponent vessel)
Parameters
vessel VesselComponent
Returns
- VesselBehavior
GetBodyByName(string)
public CelestialBodyComponent GetBodyByName(string bodyName)
Parameters
bodyName string
Returns
- CelestialBodyComponent
GetPendingActiveVessel()
public VesselComponent GetPendingActiveVessel()
Returns
- VesselComponent
GetSimulationViewIfLoaded(SimulationObjectModel)
public ISimulationObjectView GetSimulationViewIfLoaded(SimulationObjectModel model)
Parameters
model SimulationObjectModel
Returns
- ISimulationObjectView
HaveActiveVehicle(bool)
public bool HaveActiveVehicle(bool requireValidInSim = true)
Parameters
requireValidInSim bool
Returns
- bool
IsActiveVessel(VesselComponent)
public bool IsActiveVessel(VesselComponent vessel)
Parameters
vessel VesselComponent
Returns
- bool
IsVehicleValid(IVehicle, bool)
public static bool IsVehicleValid(IVehicle vehicle, bool requireValidInSim = true)
Parameters
vehicle IVehicle
requireValidInSim bool
Returns
- bool
ObserveKSC()
QuickSwitchToNextVessel()
public bool QuickSwitchToNextVessel()
Returns
- bool
QuickSwitchToPreviousVessel()
public bool QuickSwitchToPreviousVessel()
Returns
- bool
SetActiveInternalSpace(PartComponent)
public void SetActiveInternalSpace(PartComponent visiblePart)
Parameters
visiblePart PartComponent
SetActiveVehicle(IGGuid)
public bool SetActiveVehicle(IGGuid vesselGuid)
Parameters
vesselGuid IGGuid
Returns
- bool
SetActiveVehicle(IGGuid, bool)
public bool SetActiveVehicle(IGGuid vesselGuid, bool observeVehicle)
Parameters
vesselGuid IGGuid
observeVehicle bool
Returns
- bool
SetActiveVehicle(VesselComponent)
public bool SetActiveVehicle(VesselComponent simVesselComponent)
Parameters
simVesselComponent VesselComponent
Returns
- bool
SetActiveVehicle(VesselComponent, bool, bool)
public bool SetActiveVehicle(VesselComponent simVesselComponent, bool observeVehicle, bool forceVesselActive)
Parameters
simVesselComponent VesselComponent
observeVehicle bool
forceVesselActive bool
Returns
- bool
SetPause(bool)
public void SetPause(bool newPauseState)
Parameters
newPauseState bool
Shutdown()
SyncToView(UniverseView, Action)
public void SyncToView(UniverseView view, Action finishedCallback)
Parameters
view UniverseView
finishedCallback Action
TryGetActiveSimVessel(out VesselComponent, bool)
public bool TryGetActiveSimVessel(out VesselComponent activeSimVessel, bool requireValidInSim = true)
Parameters
activeSimVessel VesselComponent
requireValidInSim bool
Returns
- bool
TryGetActiveVehicle(out IVehicle, bool)
public bool TryGetActiveVehicle(out IVehicle activeVehicle, bool requireValidInSim = true)
Parameters
activeVehicle IVehicle
requireValidInSim bool
Returns
- bool
UpdateQuickSwitchList()
public void UpdateQuickSwitchList()
Events
OnViewControllerLoaded
public event Action OnViewControllerLoaded
Event Type
- Action
OnViewControllerUnloaded
public event Action OnViewControllerUnloaded
Event Type
- Action