C# Class KAS.KAS_Shared

Afficher le fichier Open project: KospY/KAS Class Usage Examples

Méthodes publiques

Méthode Description
AddNodeTransform ( Part p, AttachNode attachNode ) : void
CreatePart ( AvailablePart avPart, Vector3 position, Quaternion rotation, Part flagFromPart ) : Part
CreatePart ( string partname, Vector3 position, Quaternion rotation, Part flagFromPart ) : Part
DebugError ( string format ) : void
DebugLog ( string format ) : void
DebugWarning ( string format ) : void
DecoupleAllChilds ( Part p ) : void
DecoupleFromAll ( Part p ) : void
DirectionToQuaternion ( Transform transf, Vector3 nodeDirection ) : Quaternion
DisableEditorClickthrough ( Rect guiWindowRect ) : void
DisableVesselCollision ( Vessel vess, Collider col ) : void
GetAllChilds ( Part tgtPart, bool addSelf = false ) : List
GetAllParents ( Part tgtPart, bool addSelf = false ) : List
GetAllWinch ( Vessel fromVessel = null ) : List
GetAngleFromDirAndPoints ( Vector3 dir, Vector3 srcPos, Vector3 tgtPos ) : float
GetBaseConfigNode ( PartModule partModule ) : ConfigNode
GetConnectedWinch ( Part p ) : KASModuleWinch
GetEvaCollider ( Vessel evaVessel, string colliderName ) : Collider
GetKerbalEvaUnderCursor ( ) : KerbalEVA
GetLocalPosFrom ( Transform trf, Transform from ) : Vector3
GetLocalRotFrom ( Transform trf, Transform from ) : Quaternion
GetPartByID ( Vessel searchVessel, string partID ) : Part
GetPartByID ( string vesselID, string partID ) : Part
GetPartUnderCursor ( ) : Part
GetTransformUnderCursor ( ) : Transform
GetVesselByName ( string name ) : Vessel
GetWinchModuleGrabbed ( Vessel evaVessel ) : KASModuleWinch
InvalidateContextMenu ( Part part ) : void
LoadPartSnapshot ( Vessel vessel, ConfigNode node, Vector3 position, Quaternion rotation ) : Part
LoadProtoPartSnapshot ( ConfigNode node ) : ProtoPartSnapshot
MouseIsOverWindow ( Rect guiWindowRect ) : bool
MoveAbove ( Transform fromTransform, Vector3 fromLocalPos, Vector3 fromOrientation, RaycastHit hit ) : void
MoveAlign ( Transform source, Transform childNode, RaycastHit hit, Quaternion adjust ) : void
MoveAlign ( Transform source, Transform childNode, Transform target ) : void
MoveAlign ( Transform source, Transform childNode, Vector3 targetPos, Quaternion targetRot ) : void
MoveAlignLight ( Part fromPart, Transform fromTransform, Part toPart, Transform toTransform, List partToMoveWith = null ) : void
MoveAlignLight ( Vessel fromVessel, Transform fromTransform, Vessel toVessel, Transform toTransform ) : void
MovePartWith ( Part rootPart, List moveWithParts, Vector3 position, Quaternion rotation ) : void
MoveRelatedTo ( Transform fromTransform, Transform toTransform, Vector3 position, Vector3 direction ) : void
ParseCfgVector3 ( string vectorString ) : Vector3
RemoveAttachJointBetween ( Part part1, Part part2 ) : void
RemoveFixedJointBetween ( Part part1, Part part2 ) : void
RemoveHingeJointBetween ( Part part1, Part part2 ) : void
RequestPower ( Part prt, float power ) : bool
ResetChildPartVesselCollision ( Part p ) : void
ResetCollisionEnhancer ( Part p, bool create_new = true ) : void
SavePartSnapshot ( Part part ) : ConfigNode
SendMsgToWinch ( String methodeName, object value = null, Vessel vess = null ) : void
SetAllChildsPartPos ( string vesselID, Vector3>.Dictionary partsPos ) : void
SetChildTrfParent ( Part sourcePart, Transform parent ) : void
SetPartLocalPosFrom ( Transform trf, Transform from, Vector3 localPos ) : void
SetPartLocalPosRotFrom ( Transform trf, Transform from, Vector3 localPos, Quaternion localRot ) : void
SetPartLocalRotFrom ( Transform trf, Transform from, Quaternion localRot ) : void
SetPartsPosition ( Part rootPart, List parts, Vector3 position, bool usePristineCoords ) : void
SetPartsRotation ( Part rootPart, List parts, Quaternion rotation ) : void
UpdateChildsOrgPos ( Part p, bool includeItself = false ) : void
UpdateChildsOrgPosDelayed ( Part p, float waitTime ) : IEnumerator
createFXSound ( Part part, FXGroup group, string sndPath, bool loop, float maxDistance = 30f ) : bool

Private Methods

Méthode Description
FinishDelayedCreation ( Part part, List re_enable ) : void
GetAllChildsRecursive ( Part p ) : Part
GetAllParentsRecursive ( Part p ) : Part
WaitAndUnpack ( Part part, List re_enable ) : IEnumerator

Method Details

AddNodeTransform() public static méthode

public static AddNodeTransform ( Part p, AttachNode attachNode ) : void
p Part
attachNode AttachNode
Résultat void

CreatePart() public static méthode

public static CreatePart ( AvailablePart avPart, Vector3 position, Quaternion rotation, Part flagFromPart ) : Part
avPart AvailablePart
position Vector3
rotation UnityEngine.Quaternion
flagFromPart Part
Résultat Part

CreatePart() public static méthode

public static CreatePart ( string partname, Vector3 position, Quaternion rotation, Part flagFromPart ) : Part
partname string
position Vector3
rotation UnityEngine.Quaternion
flagFromPart Part
Résultat Part

DebugError() public static méthode

public static DebugError ( string format ) : void
format string
Résultat void

DebugLog() public static méthode

public static DebugLog ( string format ) : void
format string
Résultat void

DebugWarning() public static méthode

public static DebugWarning ( string format ) : void
format string
Résultat void

DecoupleAllChilds() public static méthode

public static DecoupleAllChilds ( Part p ) : void
p Part
Résultat void

DecoupleFromAll() public static méthode

public static DecoupleFromAll ( Part p ) : void
p Part
Résultat void

DirectionToQuaternion() public static méthode

public static DirectionToQuaternion ( Transform transf, Vector3 nodeDirection ) : Quaternion
transf UnityEngine.Transform
nodeDirection Vector3
Résultat UnityEngine.Quaternion

DisableEditorClickthrough() public static méthode

public static DisableEditorClickthrough ( Rect guiWindowRect ) : void
guiWindowRect UnityEngine.Rect
Résultat void

DisableVesselCollision() public static méthode

public static DisableVesselCollision ( Vessel vess, Collider col ) : void
vess Vessel
col UnityEngine.Collider
Résultat void

GetAllChilds() public static méthode

public static GetAllChilds ( Part tgtPart, bool addSelf = false ) : List
tgtPart Part
addSelf bool
Résultat List

GetAllParents() public static méthode

public static GetAllParents ( Part tgtPart, bool addSelf = false ) : List
tgtPart Part
addSelf bool
Résultat List

GetAllWinch() public static méthode

public static GetAllWinch ( Vessel fromVessel = null ) : List
fromVessel Vessel
Résultat List

GetAngleFromDirAndPoints() public static méthode

public static GetAngleFromDirAndPoints ( Vector3 dir, Vector3 srcPos, Vector3 tgtPos ) : float
dir Vector3
srcPos Vector3
tgtPos Vector3
Résultat float

GetBaseConfigNode() public static méthode

public static GetBaseConfigNode ( PartModule partModule ) : ConfigNode
partModule PartModule
Résultat System.ConfigNode

GetConnectedWinch() public static méthode

public static GetConnectedWinch ( Part p ) : KASModuleWinch
p Part
Résultat KASModuleWinch

GetEvaCollider() public static méthode

public static GetEvaCollider ( Vessel evaVessel, string colliderName ) : Collider
evaVessel Vessel
colliderName string
Résultat UnityEngine.Collider

GetKerbalEvaUnderCursor() public static méthode

public static GetKerbalEvaUnderCursor ( ) : KerbalEVA
Résultat KerbalEVA

GetLocalPosFrom() public static méthode

public static GetLocalPosFrom ( Transform trf, Transform from ) : Vector3
trf UnityEngine.Transform
from UnityEngine.Transform
Résultat Vector3

GetLocalRotFrom() public static méthode

public static GetLocalRotFrom ( Transform trf, Transform from ) : Quaternion
trf UnityEngine.Transform
from UnityEngine.Transform
Résultat UnityEngine.Quaternion

GetPartByID() public static méthode

public static GetPartByID ( Vessel searchVessel, string partID ) : Part
searchVessel Vessel
partID string
Résultat Part

GetPartByID() public static méthode

public static GetPartByID ( string vesselID, string partID ) : Part
vesselID string
partID string
Résultat Part

GetPartUnderCursor() public static méthode

public static GetPartUnderCursor ( ) : Part
Résultat Part

GetTransformUnderCursor() public static méthode

public static GetTransformUnderCursor ( ) : Transform
Résultat Transform

GetVesselByName() public static méthode

public static GetVesselByName ( string name ) : Vessel
name string
Résultat Vessel

GetWinchModuleGrabbed() public static méthode

public static GetWinchModuleGrabbed ( Vessel evaVessel ) : KASModuleWinch
evaVessel Vessel
Résultat KASModuleWinch

InvalidateContextMenu() public static méthode

public static InvalidateContextMenu ( Part part ) : void
part Part
Résultat void

LoadPartSnapshot() public static méthode

public static LoadPartSnapshot ( Vessel vessel, ConfigNode node, Vector3 position, Quaternion rotation ) : Part
vessel Vessel
node ConfigNode
position Vector3
rotation Quaternion
Résultat Part

LoadProtoPartSnapshot() public static méthode

public static LoadProtoPartSnapshot ( ConfigNode node ) : ProtoPartSnapshot
node ConfigNode
Résultat ProtoPartSnapshot

MouseIsOverWindow() public static méthode

public static MouseIsOverWindow ( Rect guiWindowRect ) : bool
guiWindowRect Rect
Résultat bool

MoveAbove() public static méthode

public static MoveAbove ( Transform fromTransform, Vector3 fromLocalPos, Vector3 fromOrientation, RaycastHit hit ) : void
fromTransform Transform
fromLocalPos Vector3
fromOrientation Vector3
hit RaycastHit
Résultat void

MoveAlign() public static méthode

public static MoveAlign ( Transform source, Transform childNode, RaycastHit hit, Quaternion adjust ) : void
source Transform
childNode Transform
hit RaycastHit
adjust Quaternion
Résultat void

MoveAlign() public static méthode

public static MoveAlign ( Transform source, Transform childNode, Transform target ) : void
source Transform
childNode Transform
target Transform
Résultat void

MoveAlign() public static méthode

public static MoveAlign ( Transform source, Transform childNode, Vector3 targetPos, Quaternion targetRot ) : void
source Transform
childNode Transform
targetPos Vector3
targetRot Quaternion
Résultat void

MoveAlignLight() public static méthode

public static MoveAlignLight ( Part fromPart, Transform fromTransform, Part toPart, Transform toTransform, List partToMoveWith = null ) : void
fromPart Part
fromTransform Transform
toPart Part
toTransform Transform
partToMoveWith List
Résultat void

MoveAlignLight() public static méthode

public static MoveAlignLight ( Vessel fromVessel, Transform fromTransform, Vessel toVessel, Transform toTransform ) : void
fromVessel Vessel
fromTransform Transform
toVessel Vessel
toTransform Transform
Résultat void

MovePartWith() public static méthode

public static MovePartWith ( Part rootPart, List moveWithParts, Vector3 position, Quaternion rotation ) : void
rootPart Part
moveWithParts List
position Vector3
rotation Quaternion
Résultat void

MoveRelatedTo() public static méthode

public static MoveRelatedTo ( Transform fromTransform, Transform toTransform, Vector3 position, Vector3 direction ) : void
fromTransform Transform
toTransform Transform
position Vector3
direction Vector3
Résultat void

ParseCfgVector3() public static méthode

public static ParseCfgVector3 ( string vectorString ) : Vector3
vectorString string
Résultat Vector3

RemoveAttachJointBetween() public static méthode

public static RemoveAttachJointBetween ( Part part1, Part part2 ) : void
part1 Part
part2 Part
Résultat void

RemoveFixedJointBetween() public static méthode

public static RemoveFixedJointBetween ( Part part1, Part part2 ) : void
part1 Part
part2 Part
Résultat void

RemoveHingeJointBetween() public static méthode

public static RemoveHingeJointBetween ( Part part1, Part part2 ) : void
part1 Part
part2 Part
Résultat void

RequestPower() public static méthode

public static RequestPower ( Part prt, float power ) : bool
prt Part
power float
Résultat bool

ResetChildPartVesselCollision() public static méthode

public static ResetChildPartVesselCollision ( Part p ) : void
p Part
Résultat void

ResetCollisionEnhancer() public static méthode

public static ResetCollisionEnhancer ( Part p, bool create_new = true ) : void
p Part
create_new bool
Résultat void

SavePartSnapshot() public static méthode

public static SavePartSnapshot ( Part part ) : ConfigNode
part Part
Résultat ConfigNode

SendMsgToWinch() public static méthode

public static SendMsgToWinch ( String methodeName, object value = null, Vessel vess = null ) : void
methodeName String
value object
vess Vessel
Résultat void

SetAllChildsPartPos() public static méthode

public static SetAllChildsPartPos ( string vesselID, Vector3>.Dictionary partsPos ) : void
vesselID string
partsPos Vector3>.Dictionary
Résultat void

SetChildTrfParent() public static méthode

public static SetChildTrfParent ( Part sourcePart, Transform parent ) : void
sourcePart Part
parent Transform
Résultat void

SetPartLocalPosFrom() public static méthode

public static SetPartLocalPosFrom ( Transform trf, Transform from, Vector3 localPos ) : void
trf Transform
from Transform
localPos Vector3
Résultat void

SetPartLocalPosRotFrom() public static méthode

public static SetPartLocalPosRotFrom ( Transform trf, Transform from, Vector3 localPos, Quaternion localRot ) : void
trf Transform
from Transform
localPos Vector3
localRot Quaternion
Résultat void

SetPartLocalRotFrom() public static méthode

public static SetPartLocalRotFrom ( Transform trf, Transform from, Quaternion localRot ) : void
trf Transform
from Transform
localRot Quaternion
Résultat void

SetPartsPosition() public static méthode

public static SetPartsPosition ( Part rootPart, List parts, Vector3 position, bool usePristineCoords ) : void
rootPart Part
parts List
position Vector3
usePristineCoords bool
Résultat void

SetPartsRotation() public static méthode

public static SetPartsRotation ( Part rootPart, List parts, Quaternion rotation ) : void
rootPart Part
parts List
rotation Quaternion
Résultat void

UpdateChildsOrgPos() public static méthode

public static UpdateChildsOrgPos ( Part p, bool includeItself = false ) : void
p Part
includeItself bool
Résultat void

UpdateChildsOrgPosDelayed() public static méthode

public static UpdateChildsOrgPosDelayed ( Part p, float waitTime ) : IEnumerator
p Part
waitTime float
Résultat IEnumerator

createFXSound() public static méthode

public static createFXSound ( Part part, FXGroup group, string sndPath, bool loop, float maxDistance = 30f ) : bool
part Part
group FXGroup
sndPath string
loop bool
maxDistance float
Résultat bool