C# Class KMP.KMPManager

Inheritance: UnityEngine.MonoBehaviour
Afficher le fichier Open project: TehGimp/KerbalMultiPlayer Class Usage Examples

Méthodes publiques

Свойство Type Description
GameObjectInstance UnityEngine.GameObject
LoadedModfiles List
ShaFinishedEvent ManualResetEvent
activeVesselPosition Vector3
delayForceQuit bool
displayNTP bool
dockingRelVel Vector3d>.Dictionary
encoder System.Text.UnicodeEncoding
forceQuit bool
gameArrr bool
gameCheatsEnabled bool
gameMode int
gameRunning bool
gameStart bool
inactiveVesselsPerUpdate byte
interopInQueue Queue
interopInQueueLock object
ksc UnityEngine.GameObject
kscPosition UnityEngine.Vector3d
lastSubspaceLockChange float
lastTick double
listClientTimeWarpAverage float
newFlags float>.Dictionary
numberOfFilesToCheck int
numberOfShips int
pauseMenu PauseMenu
planetariumCam PlanetariumCamera
playerName String
playerStatus VesselStatusInfo>.SortedDictionary
renderManager RenderingManager
safetyBubbleRadius double
sentVessels_Situations Vessel.Situations>.Dictionary
serverKerbals_AssignedKerbals string>.Dictionary
serverParts_CrewCapacity int>.Dictionary
serverVessels_InPresent bool>.Dictionary
serverVessels_InUse bool>.Dictionary
serverVessels_IsMine bool>.Dictionary
serverVessels_IsPrivate bool>.Dictionary
serverVessels_LastUpdateDistanceTime Dictionary>
serverVessels_LoadDelay float>.Dictionary
serverVessels_ObtSyncDelay float>.Dictionary
serverVessels_PartCounts int>.Dictionary
serverVessels_Parts List>.Dictionary
serverVessels_ProtoVessels ConfigNode>.Dictionary
serverVessels_RemoteID Guid>.Dictionary
serverVessels_RendezvousSmoothPos Dictionary>
serverVessels_RendezvousSmoothVel Dictionary>
serverVessels_SkippedRendezvousUpdates int>.Dictionary
showConnectionWindow bool
skewServerTime long
skewSubspaceSpeed float
skewTargetTick double
terminateConnection bool
updateInterval float
vessels VesselEntry>.Dictionary

Méthodes publiques

Méthode Description
Awake ( ) : void
HandleSyncCompleted ( ) : void
HandleSyncTimeCompleted ( byte data ) : void
KMPManager ( ) : System
OnGUI ( ) : void
Update ( ) : void
acceptClientInterop ( byte bytes ) : void
disconnect ( string message = "" ) : void
drawGUI ( ) : void
getAnyKeyDown ( KeyCode &key ) : bool
horizontalDistanceToSafetyBubbleEdge ( ) : double
updateStep ( ) : void
verticalDistanceToSafetyBubbleEdge ( ) : double

Private Methods

Méthode Description
CheckCrewMemberExists ( int kerbalID ) : void
CheckEditorLock ( ) : void
ClearFlagLock ( ) : void
HasModule ( string modName ) : bool

Determines if a scenario module with the specified name exists already. Only checks the name. This is used to determine when the scenarios list was not cleared properly (creating a new game does not seem to clear the list - it only sets the modules' moduleRefs to null, which caused failure to sync on career servers, by creating another two modules and then attempting to write data into all four, and might have caused career mode on non-career servers if you weren't restarting KSP after exiting career servers).

LogScience ( ) : void

Log current game science, and log some debug information. Logs the science amount, or -1 if there is no current game, or no scenarios, or no R&D proto scenario module. This was used for debugging to figure out what and where things were going wrong with connecting after disconnecting (#578, #579).

OnCrewBoardVessel ( Part>.GameEvents data ) : void
OnCrewOnEva ( Part>.GameEvents data ) : void
OnFirstFlightReady ( ) : void
OnFlightReady ( ) : void
OnGUIRnDComplexDespawn ( ) : void
OnGameSceneLoadRequested ( GameScenes data ) : void
OnKnowledgeChanged ( DiscoveryLevels>.GameEvents data ) : void
OnNewVesselCreated ( Vessel vessel ) : void
OnPartCouple ( Part>.GameEvents data ) : void
OnPartUndock ( Part data ) : void
OnProgressComplete ( ProgressNode data ) : void
OnProgressReached ( ProgressNode data ) : void
OnTechnologyResearched ( RDTech.OperationResult>.GameEvents data ) : void
OnTimeWarpRateChanged ( ) : void
OnVesselDestroy ( Vessel data ) : void
OnVesselLoaded ( Vessel data ) : void
OnVesselRecovered ( ProtoVessel data ) : void
OnVesselTerminated ( ProtoVessel data ) : void
SkewTime ( ) : void
Start ( ) : void
SyncTime ( ) : void
addRemoteVessel ( ProtoVessel protovessel, System.Guid vessel_id, KMPVessel kvessel = null, KMPVesselUpdate update = null, double distance = 501d ) : void
applyScenarioUpdate ( KMP.KMPScenarioUpdate update ) : void
applyScreenshotTexture ( byte image_data ) : IEnumerator
applyVesselUpdate ( KMPVesselUpdate vessel_update, KMPVessel vessel ) : void
beginFinishSync ( ) : void
chatWindow ( int windowID ) : void
chatWindowDX ( int windowID ) : void
checkOrbitForCollision ( Orbit orbit, double tick, double fromTick ) : bool
checkProtoNodeCrew ( ConfigNode protoNode ) : void
checkRemoteVesselIntegrity ( ) : void
checkVesselPrivacy ( Vessel vessel ) : void
clearCrewGUI ( ) : void
connectionButton ( String name ) : void
connectionWindow ( int windowID ) : void
dockedKickToTrackingStation ( ) : void
enforceWindowBoundaries ( Rect window ) : Rect
enqueueChatOutMessage ( String message ) : void
enqueuePluginInteropMessage ( KMPCommon id, byte data ) : void
finishInGameSync ( ) : void
finishSync ( ) : void
getKrakensbane ( ) : Krakensbane
getVesselDetail ( Vessel vessel ) : KMPVesselDetail
getVesselUpdate ( Vessel vessel, bool forceFullUpdate = false, bool idOnlyUpdate = false ) : KMPVesselUpdate
handleInteropMessage ( KMPCommon id, byte data ) : void
handleScenarioUpdate ( object obj ) : void
handleSyncTimeout ( ) : void
handleUpdate ( object obj ) : void
handleVesselUpdate ( KMPVesselUpdate vessel_update ) : void
infoDisplayWindow ( int windowID ) : void
isInSafetyBubble ( UnityEngine.Vector3d pos, CelestialBody body, double altitude ) : bool
isProtoVesselInSafetyBubble ( ProtoVessel protovessel ) : bool
kickToTrackingStation ( ) : void
killVessel ( Vessel vessel ) : void
killVesselOnNextUpdate ( Vessel vessel ) : IEnumerator
krakensBaneWarp ( double krakensTick ) : void
loadGlobalSettings ( ) : void
loadProtovessel ( Vessel oldVessel, Vector3 newWorldPos, Vector3 newOrbitVel, bool wasLoaded, bool wasActive, bool setTarget, ProtoVessel protovessel, System.Guid vessel_id, KMPVessel kvessel, KMPVesselUpdate update, double distance ) : IEnumerator
lockCrewGUI ( ) : void
lockWindow ( int windowID ) : void
processClientInterop ( ) : void
readIntFromStream ( KSP stream ) : Int32
removeDockedVessel ( Vessel vessel ) : void
removeKMPControlLocks ( ) : void
restoreVesselState ( Vessel vessel, Vector3 newWorldPos, Vector3 newOrbitVel ) : IEnumerator
returnToSpaceCenter ( ) : IEnumerator
returnToTrackingStation ( ) : IEnumerator
safeDelete ( String filename ) : void
saveGlobalSettings ( ) : void
screenshotWatchButton ( String name ) : void
screenshotWindow ( int windowID ) : void
sendInitialSyncRequest ( ) : void
sendRemoveVesselMessage ( Vessel vessel, bool isDocking = false ) : void
sendScenarios ( ) : void
sendSubspaceSyncRequest ( int subspace = -1, bool docking = false ) : IEnumerator
sendVesselMessage ( Vessel vessel, bool isDocking = false, int giveUp, bool forceActive = false ) : void
sendVesselMessageOnNextFixedUpdate ( Vessel vessel, bool isDocking = false, int giveUp ) : IEnumerator
setActiveVessel ( Vessel vessel, Vessel oldVessel ) : IEnumerator
setDockingTarget ( Vessel vessel ) : IEnumerator
setFinishDocking ( ) : void
setMidDocking ( ) : void
setNewVesselNotInPresent ( Vessel vessel ) : IEnumerator
setNotWarping ( ) : void
setPartOpacity ( Part part, float opacity ) : void
shareScreenshot ( ) : IEnumerator
statusArrayToInfo ( String status_array ) : VesselStatusInfo
syncExtantVesselOrbit ( KMPVessel kvessel, double fromTick, Vessel extant_vessel, double LAN ) : bool
syncOrbit ( KMPVessel kvessel, double fromTick, ProtoVessel protovessel, double LAN ) : ProtoVessel
unlockCrewGUI ( ) : void
vesselStatusLabels ( VesselStatusInfo status, bool big ) : void
writeIntToStream ( KSP stream, Int32 val ) : void
writePluginData ( ) : void
writePluginUpdate ( ) : void
writePrimaryUpdate ( ) : void
writeSecondaryUpdates ( ) : void
writeUpdates ( ) : void

Method Details

Awake() public méthode

public Awake ( ) : void
Résultat void

HandleSyncCompleted() public méthode

public HandleSyncCompleted ( ) : void
Résultat void

HandleSyncTimeCompleted() public méthode

public HandleSyncTimeCompleted ( byte data ) : void
data byte
Résultat void

KMPManager() public méthode

public KMPManager ( ) : System
Résultat System

OnGUI() public méthode

public OnGUI ( ) : void
Résultat void

Update() public méthode

public Update ( ) : void
Résultat void

acceptClientInterop() public méthode

public acceptClientInterop ( byte bytes ) : void
bytes byte
Résultat void

disconnect() public méthode

public disconnect ( string message = "" ) : void
message string
Résultat void

drawGUI() public méthode

public drawGUI ( ) : void
Résultat void

getAnyKeyDown() public méthode

public getAnyKeyDown ( KeyCode &key ) : bool
key KeyCode
Résultat bool

horizontalDistanceToSafetyBubbleEdge() public méthode

public horizontalDistanceToSafetyBubbleEdge ( ) : double
Résultat double

updateStep() public méthode

public updateStep ( ) : void
Résultat void

verticalDistanceToSafetyBubbleEdge() public méthode

public verticalDistanceToSafetyBubbleEdge ( ) : double
Résultat double

Property Details

GameObjectInstance public_oe static_oe property

public static GameObject,UnityEngine GameObjectInstance
Résultat UnityEngine.GameObject

LoadedModfiles public_oe static_oe property

public static List LoadedModfiles
Résultat List

ShaFinishedEvent public_oe static_oe property

public static ManualResetEvent ShaFinishedEvent
Résultat ManualResetEvent

activeVesselPosition public_oe property

public Vector3 activeVesselPosition
Résultat Vector3

delayForceQuit public_oe property

public bool delayForceQuit
Résultat bool

displayNTP public_oe property

public bool displayNTP
Résultat bool

dockingRelVel public_oe property

public Dictionary dockingRelVel
Résultat Vector3d>.Dictionary

encoder public_oe property

public UnicodeEncoding,System.Text encoder
Résultat System.Text.UnicodeEncoding

forceQuit public_oe property

public bool forceQuit
Résultat bool

gameArrr public_oe property

public bool gameArrr
Résultat bool

gameCheatsEnabled public_oe property

public bool gameCheatsEnabled
Résultat bool

gameMode public_oe property

public int gameMode
Résultat int

gameRunning public_oe property

public bool gameRunning
Résultat bool

gameStart public_oe property

public bool gameStart
Résultat bool

inactiveVesselsPerUpdate public_oe property

public byte inactiveVesselsPerUpdate
Résultat byte

interopInQueue public_oe property

public Queue interopInQueue
Résultat Queue

interopInQueueLock public_oe static_oe property

public static object interopInQueueLock
Résultat object

ksc public_oe property

public GameObject,UnityEngine ksc
Résultat UnityEngine.GameObject

kscPosition public_oe property

public Vector3d,UnityEngine kscPosition
Résultat UnityEngine.Vector3d

lastSubspaceLockChange public_oe property

public float lastSubspaceLockChange
Résultat float

lastTick public_oe property

public double lastTick
Résultat double

listClientTimeWarpAverage public_oe property

public float listClientTimeWarpAverage
Résultat float

newFlags public_oe property

public Dictionary newFlags
Résultat float>.Dictionary

numberOfFilesToCheck public_oe static_oe property

public static int numberOfFilesToCheck
Résultat int

numberOfShips public_oe property

public int numberOfShips
Résultat int

pauseMenu public_oe property

public PauseMenu pauseMenu
Résultat PauseMenu

planetariumCam public_oe property

public PlanetariumCamera planetariumCam
Résultat PlanetariumCamera

playerName public_oe property

public String playerName
Résultat String

playerStatus public_oe property

public SortedDictionary playerStatus
Résultat VesselStatusInfo>.SortedDictionary

renderManager public_oe property

public RenderingManager renderManager
Résultat RenderingManager

safetyBubbleRadius public_oe property

public double safetyBubbleRadius
Résultat double

sentVessels_Situations public_oe property

public Dictionary sentVessels_Situations
Résultat Vessel.Situations>.Dictionary

serverKerbals_AssignedKerbals public_oe property

public Dictionary serverKerbals_AssignedKerbals
Résultat string>.Dictionary

serverParts_CrewCapacity public_oe property

public Dictionary serverParts_CrewCapacity
Résultat int>.Dictionary

serverVessels_InPresent public_oe property

public Dictionary serverVessels_InPresent
Résultat bool>.Dictionary

serverVessels_InUse public_oe property

public Dictionary serverVessels_InUse
Résultat bool>.Dictionary

serverVessels_IsMine public_oe property

public Dictionary serverVessels_IsMine
Résultat bool>.Dictionary

serverVessels_IsPrivate public_oe property

public Dictionary serverVessels_IsPrivate
Résultat bool>.Dictionary

serverVessels_LastUpdateDistanceTime public_oe property

public Dictionary> serverVessels_LastUpdateDistanceTime
Résultat Dictionary>

serverVessels_LoadDelay public_oe property

public Dictionary serverVessels_LoadDelay
Résultat float>.Dictionary

serverVessels_ObtSyncDelay public_oe property

public Dictionary serverVessels_ObtSyncDelay
Résultat float>.Dictionary

serverVessels_PartCounts public_oe property

public Dictionary serverVessels_PartCounts
Résultat int>.Dictionary

serverVessels_Parts public_oe property

public Dictionary> serverVessels_Parts
Résultat List>.Dictionary

serverVessels_ProtoVessels public_oe property

public Dictionary serverVessels_ProtoVessels
Résultat ConfigNode>.Dictionary

serverVessels_RemoteID public_oe property

public Dictionary serverVessels_RemoteID
Résultat Guid>.Dictionary

serverVessels_RendezvousSmoothPos public_oe property

public Dictionary> serverVessels_RendezvousSmoothPos
Résultat Dictionary>

serverVessels_RendezvousSmoothVel public_oe property

public Dictionary> serverVessels_RendezvousSmoothVel
Résultat Dictionary>

serverVessels_SkippedRendezvousUpdates public_oe property

public Dictionary serverVessels_SkippedRendezvousUpdates
Résultat int>.Dictionary

showConnectionWindow public_oe static_oe property

public static bool showConnectionWindow
Résultat bool

skewServerTime public_oe property

public long skewServerTime
Résultat long

skewSubspaceSpeed public_oe property

public float skewSubspaceSpeed
Résultat float

skewTargetTick public_oe property

public double skewTargetTick
Résultat double

terminateConnection public_oe property

public bool terminateConnection
Résultat bool

updateInterval public_oe property

public float updateInterval
Résultat float

vessels public_oe property

public Dictionary vessels
Résultat VesselEntry>.Dictionary