Class PartBehavior
- Namespace
- KSP.Sim.impl
- Assembly
- Assembly-CSharp.dll
public class PartBehavior : ViewObjectComponent<PartComponent>, IInteractivePart, IFixedUpdate, IPriorityOverride, WaterManager.IWaterDetectObject
- Inheritance
-
PartBehavior
- Implements
-
- Inherited Members
-
- Extension Methods
-
Constructors
PartBehavior()
Fields
public bool GroundContact
Field Value
- bool
public Vector3 GroundContactNormal
Field Value
- Vector3
public bool PermanentGroundContact
Field Value
- bool
Field Value
- bool
WaterDetectObjectId
public uint WaterDetectObjectId
Field Value
- uint
currentCollisions
public List<Collider> currentCollisions
Field Value
- List<Collider>
debugMode
Field Value
- bool
partBrake
public IPartBrakes partBrake
Field Value
- IPartBrakes
Properties
Category
public PartCategories Category { get; }
Property Value
- PartCategories
Colliders
public Collider[] Colliders { get; }
Property Value
- Collider[]
Guid
public IGGuid Guid { get; }
Property Value
- IGGuid
IsInitialized
public bool IsInitialized { get; }
Property Value
- bool
IsNoCrashDamageEnabled
public bool IsNoCrashDamageEnabled { get; }
Property Value
- bool
Landed
public bool Landed { get; }
Property Value
- bool
Model
public PartComponent Model { get; }
Property Value
- PartComponent
public Transform ModelTransform { get; }
Property Value
- Transform
ModelType
public Type ModelType { get; }
Property Value
- Type
Modules
public DictionaryValueList<Type, IPartModule> Modules { get; }
Property Value
- DictionaryValueList<Type, IPartModule>
Name
public string Name { get; }
Property Value
- string
PartAudioManager
public KSPPartAudioManager PartAudioManager { get; }
Property Value
- KSPPartAudioManager
PartHeatIndicatorTracker
public PartHeatIndicatorTracker PartHeatIndicatorTracker { get; }
Property Value
- PartHeatIndicatorTracker
Renderers
public Renderer[] Renderers { get; }
Property Value
- Renderer[]
Rigidbody
public RigidbodyBehavior Rigidbody { get; }
Property Value
- RigidbodyBehavior
ShieldedFromAirstream
public bool ShieldedFromAirstream { get; set; }
Property Value
- bool
SpeedRelativeToSOIBodyFrameInPhysics
public double SpeedRelativeToSOIBodyFrameInPhysics { get; }
Property Value
- double
Splashed
public bool Splashed { get; }
Property Value
- bool
VelocityRelativeToSOIBodyFrame
public Vector VelocityRelativeToSOIBodyFrame { get; }
Property Value
- Vector
VelocityRelativeToSOIBodyFrameInPhysicsSpace
public Vector3 VelocityRelativeToSOIBodyFrameInPhysicsSpace { get; }
Property Value
- Vector3
_collider
public Collider _collider { get; }
Property Value
- Collider
atmDensity
public double atmDensity { get; }
Property Value
- double
dynamicPressure
public float dynamicPressure { get; }
Property Value
- float
dynamicPressure_kPa
public float dynamicPressure_kPa { get; }
Property Value
- float
explosionPotential
public float explosionPotential { get; }
Property Value
- float
fxGroups
public List<FXGroup> fxGroups { get; }
Property Value
- List<FXGroup>
machNumber
public double machNumber { get; }
Property Value
- double
partOwner
public PartOwnerBehavior partOwner { get; }
Property Value
- PartOwnerBehavior
seperationVFXController
public SeperationVFXController seperationVFXController { get; }
Property Value
- SeperationVFXController
soundSpeed
public double soundSpeed { get; }
Property Value
- double
staticPressureAtm
public double staticPressureAtm { get; }
Property Value
- double
vessel
public VesselBehavior vessel { get; }
Property Value
- VesselBehavior
Methods
ActivateAllModules()
public void ActivateAllModules()
AddForce(IForce)
public void AddForce(IForce force)
Parameters
force IForce
AddSingleFrameForce(IForce)
public void AddSingleFrameForce(IForce force)
Parameters
force IForce
AddSkinThermalFlux(double)
public void AddSkinThermalFlux(double v)
Parameters
v double
AddThermalFlux(double)
public void AddThermalFlux(double thermalFlux)
Parameters
thermalFlux double
AddTorque(ITorque)
public void AddTorque(ITorque torque)
Parameters
torque ITorque
ApplyImpulse(ForceType, Vector3d, Vector3d)
public void ApplyImpulse(ForceType forceType, Vector3d relativeImpulse, Vector3d relativePosition)
Parameters
forceType ForceType
relativeImpulse Vector3d
relativePosition Vector3d
CheckBodyLiftAttachment()
public void CheckBodyLiftAttachment()
CleanSymmetryVesselReferences()
public void CleanSymmetryVesselReferences()
CleanSymmetryVesselReferencesRecursively()
public void CleanSymmetryVesselReferencesRecursively()
DestroyInteractivePart()
public void DestroyInteractivePart()
DestroyPart()
public void DestroyPart()
ExecuteInteractivePartDestruction()
public void ExecuteInteractivePartDestruction()
FindAttachNode(string)
public AttachNodeData FindAttachNode(string nodeId)
Parameters
nodeId string
Returns
- AttachNodeData
FindFxGroup(string)
public FXGroup FindFxGroup(string v)
Parameters
v string
Returns
- FXGroup
public Transform FindModelTransform(string transformName)
Parameters
transformName string
Returns
- Transform
public IEnumerable<Transform> FindModelTransforms(string transformName)
Parameters
transformName string
Returns
- IEnumerable<Transform>
GetCategoryName()
public string GetCategoryName()
Returns
- string
GetComponentUpwards<T>(GameObject)
public static T GetComponentUpwards<T>(GameObject obj) where T : Component
Parameters
obj GameObject
Returns
- T
Type Parameters
T
GetDisplayName()
public string GetDisplayName()
Returns
- string
GetModule(Type)
public IPartModule GetModule(Type moduleType)
Parameters
moduleType Type
Returns
- IPartModule
GetModule<T>()
public T GetModule<T>() where T : class, IPartModule
Returns
- T
Type Parameters
T
GetPartOwner()
public PartOwnerBehavior GetPartOwner()
Returns
- PartOwnerBehavior
GetVesselBehavior()
public VesselBehavior GetVesselBehavior()
Returns
- VesselBehavior
HandleCollisionEnter(CollisionDetails)
public static void HandleCollisionEnter(CollisionDetails collisionData)
Parameters
collisionData CollisionDetails
HandleCollisionExit(CollisionDetails)
public static void HandleCollisionExit(CollisionDetails collisionData)
Parameters
collisionData CollisionDetails
HandleCollisionStay(CollisionDetails)
public static void HandleCollisionStay(CollisionDetails collisionData)
Parameters
collisionData CollisionDetails
HandlePartDetach(PartOwnerBehavior, bool)
public void HandlePartDetach(PartOwnerBehavior oldOwner, bool showFX)
Parameters
oldOwner PartOwnerBehavior
showFX bool
HandlePartDetachEffects(PartOwnerBehavior)
public void HandlePartDetachEffects(PartOwnerBehavior oldOwner)
Parameters
oldOwner PartOwnerBehavior
HandlePartDetachPhysics(PartOwnerBehavior)
public void HandlePartDetachPhysics(PartOwnerBehavior oldOwner)
Parameters
oldOwner PartOwnerBehavior
HandleWaterSplashEffects(Vector3, float, float)
public void HandleWaterSplashEffects(Vector3 contactPoint, float deviationFromVertical, float contactVelocity)
Parameters
contactPoint Vector3
deviationFromVertical float
contactVelocity float
IsDefaultLayer(int)
public static bool IsDefaultLayer(int gameObjectLayer)
Parameters
gameObjectLayer int
Returns
- bool
IsLandableLayer(int)
public static bool IsLandableLayer(int gameObjectLayer)
Parameters
gameObjectLayer int
Returns
- bool
IsSceneryLayer(int)
public static bool IsSceneryLayer(int gameObjectLayer)
Parameters
gameObjectLayer int
Returns
- bool
IsTerrainLayer(int)
public static bool IsTerrainLayer(int gameObjectLayer)
Parameters
gameObjectLayer int
Returns
- bool
OnCollisionEnter(Collision)
public void OnCollisionEnter(Collision c)
Parameters
c Collision
OnCollisionExit(Collision)
public void OnCollisionExit(Collision c)
Parameters
c Collision
OnCollisionStay(Collision)
public void OnCollisionStay(Collision c)
Parameters
c Collision
OnFixedUpdate(float)
public void OnFixedUpdate(float deltaTime)
Parameters
deltaTime float
OnJointBreak(float)
public void OnJointBreak(float breakForce)
Parameters
breakForce float
OnTriggerEnter(Collider)
public void OnTriggerEnter(Collider otherCollider)
Parameters
otherCollider Collider
PublishPartDetachMessage()
public void PublishPartDetachMessage()
RedirectChildPhysX(Rigidbody)
public void RedirectChildPhysX(Rigidbody rb)
Parameters
rb Rigidbody
RemoveForce(IForce)
public bool RemoveForce(IForce force)
Parameters
force IForce
Returns
- bool
RemoveTorque(ITorque)
public void RemoveTorque(ITorque torque)
Parameters
torque ITorque
ResetPartColliders()
public void ResetPartColliders()
StartPhysX()
StopPhysX()
SyncTo(PartComponent)
public override void SyncTo(PartComponent simObjectComponent)
Parameters
simObjectComponent PartComponent
SyncToSimulationObject()
public void SyncToSimulationObject()
VerifyPackPhysX()
public bool VerifyPackPhysX()
Returns
- bool
VerifyStopPhysX()
public bool VerifyStopPhysX()
Returns
- bool
VerifyUnpackPhysX(bool, bool)
public bool VerifyUnpackPhysX(bool rigidbodyExpected, bool jointExpected)
Parameters
rigidbodyExpected bool
jointExpected bool
Returns
- bool
Events
OnPack
public event Action<PartBehavior> OnPack
Event Type
- Action<PartBehavior>
OnUnpack
public event Action<PartBehavior> OnUnpack
Event Type
- Action<PartBehavior>