C# Класс KMP.KMPManager

Наследование: UnityEngine.MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Awake() публичный Метод

public Awake ( ) : void
Результат void

HandleSyncCompleted() публичный Метод

public HandleSyncCompleted ( ) : void
Результат void

HandleSyncTimeCompleted() публичный Метод

public HandleSyncTimeCompleted ( byte data ) : void
data byte
Результат void

KMPManager() публичный Метод

public KMPManager ( ) : System
Результат System

OnGUI() публичный Метод

public OnGUI ( ) : void
Результат void

Update() публичный Метод

public Update ( ) : void
Результат void

acceptClientInterop() публичный Метод

public acceptClientInterop ( byte bytes ) : void
bytes byte
Результат void

disconnect() публичный Метод

public disconnect ( string message = "" ) : void
message string
Результат void

drawGUI() публичный Метод

public drawGUI ( ) : void
Результат void

getAnyKeyDown() публичный Метод

public getAnyKeyDown ( KeyCode &key ) : bool
key KeyCode
Результат bool

horizontalDistanceToSafetyBubbleEdge() публичный Метод

public horizontalDistanceToSafetyBubbleEdge ( ) : double
Результат double

updateStep() публичный Метод

public updateStep ( ) : void
Результат void

verticalDistanceToSafetyBubbleEdge() публичный Метод

public verticalDistanceToSafetyBubbleEdge ( ) : double
Результат double

Описание свойств

GameObjectInstance публичное статическое свойство

public static GameObject,UnityEngine GameObjectInstance
Результат UnityEngine.GameObject

LoadedModfiles публичное статическое свойство

public static List LoadedModfiles
Результат List

ShaFinishedEvent публичное статическое свойство

public static ManualResetEvent ShaFinishedEvent
Результат ManualResetEvent

activeVesselPosition публичное свойство

public Vector3 activeVesselPosition
Результат Vector3

delayForceQuit публичное свойство

public bool delayForceQuit
Результат bool

displayNTP публичное свойство

public bool displayNTP
Результат bool

dockingRelVel публичное свойство

public Dictionary dockingRelVel
Результат Vector3d>.Dictionary

encoder публичное свойство

public UnicodeEncoding,System.Text encoder
Результат System.Text.UnicodeEncoding

forceQuit публичное свойство

public bool forceQuit
Результат bool

gameArrr публичное свойство

public bool gameArrr
Результат bool

gameCheatsEnabled публичное свойство

public bool gameCheatsEnabled
Результат bool

gameMode публичное свойство

public int gameMode
Результат int

gameRunning публичное свойство

public bool gameRunning
Результат bool

gameStart публичное свойство

public bool gameStart
Результат bool

inactiveVesselsPerUpdate публичное свойство

public byte inactiveVesselsPerUpdate
Результат byte

interopInQueue публичное свойство

public Queue interopInQueue
Результат Queue

interopInQueueLock публичное статическое свойство

public static object interopInQueueLock
Результат object

ksc публичное свойство

public GameObject,UnityEngine ksc
Результат UnityEngine.GameObject

kscPosition публичное свойство

public Vector3d,UnityEngine kscPosition
Результат UnityEngine.Vector3d

lastSubspaceLockChange публичное свойство

public float lastSubspaceLockChange
Результат float

lastTick публичное свойство

public double lastTick
Результат double

listClientTimeWarpAverage публичное свойство

public float listClientTimeWarpAverage
Результат float

newFlags публичное свойство

public Dictionary newFlags
Результат float>.Dictionary

numberOfFilesToCheck публичное статическое свойство

public static int numberOfFilesToCheck
Результат int

numberOfShips публичное свойство

public int numberOfShips
Результат int

pauseMenu публичное свойство

public PauseMenu pauseMenu
Результат PauseMenu

planetariumCam публичное свойство

public PlanetariumCamera planetariumCam
Результат PlanetariumCamera

playerName публичное свойство

public String playerName
Результат String

playerStatus публичное свойство

public SortedDictionary playerStatus
Результат VesselStatusInfo>.SortedDictionary

renderManager публичное свойство

public RenderingManager renderManager
Результат RenderingManager

safetyBubbleRadius публичное свойство

public double safetyBubbleRadius
Результат double

sentVessels_Situations публичное свойство

public Dictionary sentVessels_Situations
Результат Vessel.Situations>.Dictionary

serverKerbals_AssignedKerbals публичное свойство

public Dictionary serverKerbals_AssignedKerbals
Результат string>.Dictionary

serverParts_CrewCapacity публичное свойство

public Dictionary serverParts_CrewCapacity
Результат int>.Dictionary

serverVessels_InPresent публичное свойство

public Dictionary serverVessels_InPresent
Результат bool>.Dictionary

serverVessels_InUse публичное свойство

public Dictionary serverVessels_InUse
Результат bool>.Dictionary

serverVessels_IsMine публичное свойство

public Dictionary serverVessels_IsMine
Результат bool>.Dictionary

serverVessels_IsPrivate публичное свойство

public Dictionary serverVessels_IsPrivate
Результат bool>.Dictionary

serverVessels_LastUpdateDistanceTime публичное свойство

public Dictionary> serverVessels_LastUpdateDistanceTime
Результат Dictionary>

serverVessels_LoadDelay публичное свойство

public Dictionary serverVessels_LoadDelay
Результат float>.Dictionary

serverVessels_ObtSyncDelay публичное свойство

public Dictionary serverVessels_ObtSyncDelay
Результат float>.Dictionary

serverVessels_PartCounts публичное свойство

public Dictionary serverVessels_PartCounts
Результат int>.Dictionary

serverVessels_Parts публичное свойство

public Dictionary> serverVessels_Parts
Результат List>.Dictionary

serverVessels_ProtoVessels публичное свойство

public Dictionary serverVessels_ProtoVessels
Результат ConfigNode>.Dictionary

serverVessels_RemoteID публичное свойство

public Dictionary serverVessels_RemoteID
Результат Guid>.Dictionary

serverVessels_RendezvousSmoothPos публичное свойство

public Dictionary> serverVessels_RendezvousSmoothPos
Результат Dictionary>

serverVessels_RendezvousSmoothVel публичное свойство

public Dictionary> serverVessels_RendezvousSmoothVel
Результат Dictionary>

serverVessels_SkippedRendezvousUpdates публичное свойство

public Dictionary serverVessels_SkippedRendezvousUpdates
Результат int>.Dictionary

showConnectionWindow публичное статическое свойство

public static bool showConnectionWindow
Результат bool

skewServerTime публичное свойство

public long skewServerTime
Результат long

skewSubspaceSpeed публичное свойство

public float skewSubspaceSpeed
Результат float

skewTargetTick публичное свойство

public double skewTargetTick
Результат double

terminateConnection публичное свойство

public bool terminateConnection
Результат bool

updateInterval публичное свойство

public float updateInterval
Результат float

vessels публичное свойство

public Dictionary vessels
Результат VesselEntry>.Dictionary