C# Class KAS.KASModuleWinch

Inheritance: KASModuleAttachCore, IJointLockState
Datei anzeigen Open project: KospY/KAS Class Usage Examples

Public Properties

Property Type Description
cableJoint UnityEngine.SpringJoint
connectedPortInfo PortInfo
evaHolderPart Part
extend KAS_Shared.cableControl
fxSndEject FXGroup
fxSndHeadGrab FXGroup
fxSndHeadLock FXGroup
fxSndMotor FXGroup
fxSndMotorStart FXGroup
fxSndMotorStop FXGroup
grabbedPortModule KASModulePort
guiRepeatExtend bool
guiRepeatRetract bool
guiRepeatTurnLeft bool
guiRepeatTurnRight bool
headPortNode UnityEngine.Transform
headTransform UnityEngine.Transform
highLightStarted bool
isActive bool
motorSpeed float
motorSpeedSetting float
release KAS_Shared.cableControl
retract KAS_Shared.cableControl
tubeRenderer KAS.KAS_Tube

Public Methods

Method Description
BringMotorToSpeed ( float targetSpeed ) : void

Accelerates or decelerates the motor to match the target speed.

Acceleration is controlled via motorAcceleration which specifies speed change per second.

ChangePlugMode ( PlugState newPlugMode ) : void
CheckBlocked ( bool message = false ) : bool
Deploy ( bool delayPhysics = false ) : void
DropHead ( ) : void
Eject ( ) : void
EventWinchEject ( ) : void
EventWinchExtend ( bool activated ) : void
EventWinchHeadLeft ( ) : void
EventWinchHeadRight ( ) : void
EventWinchHook ( ) : void
EventWinchRetract ( bool activated ) : void
GetHookGrapple ( ) : KAS.KASModuleHarpoon
GetHookMagnet ( ) : KAS.KASModuleMagnet
GetInfo ( ) : string
GrabHead ( Vessel kerbalEvaVessel, KASModulePort grabbedPort = null ) : void
IsJointUnlocked ( ) : bool
Lock ( ) : void
LockHead ( ) : void
OnCrewBoardVessel ( Part>.GameEvents fromToAction ) : void
OnFullRetract ( ) : void
OnLoad ( ConfigNode node ) : void
OnPartUnpack ( ) : void
OnSave ( ConfigNode node ) : void
OnStart ( StartState state ) : void
OnUpdate ( ) : void
OnVesselGoOffRails ( Vessel vess ) : void
OnVesselGoOnRails ( Vessel vess ) : void
PlugHead ( KASModulePort portModule, PlugState plugMode, bool fromSave = false, bool fireSound = true, bool alreadyDocked = false ) : void
RefreshControlState ( ) : void
SetCableJointConnectedBody ( Rigidbody newBody ) : void
SetHeadToPhysic ( bool active, bool delayPhysics = false ) : void
SetTubeRenderer ( bool activated ) : void
TogglePlugMode ( ) : void
UnplugHead ( bool fireSound = true ) : void

Protected Methods

Method Description
OnDestroy ( ) : void
OnPartDie ( ) : void

Private Methods

Method Description
ActionGroupDisableInvertedKeyControl ( KSPActionParam param ) : void
ActionGroupDisableKeyControl ( KSPActionParam param ) : void
ActionGroupEject ( KSPActionParam param ) : void
ActionGroupEnableInvertedKeyControl ( KSPActionParam param ) : void
ActionGroupEnableKeyControl ( KSPActionParam param ) : void
ActionGroupExtend ( KSPActionParam param ) : void
ActionGroupPlugMode ( KSPActionParam param ) : void
ActionGroupRelease ( KSPActionParam param ) : void
ActionGroupRetract ( KSPActionParam param ) : void
ActionGroupToggleInvertedKeyControl ( KSPActionParam param ) : void
ActionGroupToggleKeyControl ( KSPActionParam param ) : void
ActionGroupUnplug ( KSPActionParam param ) : void
ContextMenuCableStretch ( ) : void
ContextMenuEject ( ) : void
ContextMenuExtend ( ) : void
ContextMenuGUI ( ) : void
ContextMenuGrabHead ( ) : void
ContextMenuInvertControl ( ) : void
ContextMenuLockHead ( ) : void
ContextMenuPlugMode ( ) : void
ContextMenuRelease ( ) : void
ContextMenuRetract ( ) : void
ContextMenuToggleControl ( ) : void
ContextMenuUnplug ( ) : void
DisableWinch ( ) : void
IsLockable ( ) : bool
LimitFreeFlyDistance ( Rigidbody rb, float maxLength ) : IEnumerator

A coroutine to restore performance collision check mode.

Given the maximum length of the cable this coroutine estimates how long will it take for a harpoon to hit anything, and this time is used as a timeout. When a target is hit the collision check mode get reset in the harpoon's code right at the impact. If harpoon hit nothing then this coroutine will disable the mode by timeout.

StopExtend ( ) : void
StopRetract ( ) : void
UpdateMotor ( ) : void
UpdateOrgPos ( ) : void
WaitAndLoadConnection ( ) : IEnumerator

Method Details

BringMotorToSpeed() public method

Accelerates or decelerates the motor to match the target speed.
Acceleration is controlled via motorAcceleration which specifies speed change per second.
public BringMotorToSpeed ( float targetSpeed ) : void
targetSpeed float
return void

ChangePlugMode() public method

public ChangePlugMode ( PlugState newPlugMode ) : void
newPlugMode PlugState
return void

CheckBlocked() public method

public CheckBlocked ( bool message = false ) : bool
message bool
return bool

Deploy() public method

public Deploy ( bool delayPhysics = false ) : void
delayPhysics bool
return void

DropHead() public method

public DropHead ( ) : void
return void

Eject() public method

public Eject ( ) : void
return void

EventWinchEject() public method

public EventWinchEject ( ) : void
return void

EventWinchExtend() public method

public EventWinchExtend ( bool activated ) : void
activated bool
return void

EventWinchHeadLeft() public method

public EventWinchHeadLeft ( ) : void
return void

EventWinchHeadRight() public method

public EventWinchHeadRight ( ) : void
return void

EventWinchHook() public method

public EventWinchHook ( ) : void
return void

EventWinchRetract() public method

public EventWinchRetract ( bool activated ) : void
activated bool
return void

GetHookGrapple() public method

public GetHookGrapple ( ) : KAS.KASModuleHarpoon
return KAS.KASModuleHarpoon

GetHookMagnet() public method

public GetHookMagnet ( ) : KAS.KASModuleMagnet
return KAS.KASModuleMagnet

GetInfo() public method

public GetInfo ( ) : string
return string

GrabHead() public method

public GrabHead ( Vessel kerbalEvaVessel, KASModulePort grabbedPort = null ) : void
kerbalEvaVessel Vessel
grabbedPort KASModulePort
return void

IsJointUnlocked() public method

public IsJointUnlocked ( ) : bool
return bool

Lock() public method

public Lock ( ) : void
return void

LockHead() public method

public LockHead ( ) : void
return void

OnCrewBoardVessel() public method

public OnCrewBoardVessel ( Part>.GameEvents fromToAction ) : void
fromToAction Part>.GameEvents
return void

OnDestroy() protected method

protected OnDestroy ( ) : void
return void

OnFullRetract() public method

public OnFullRetract ( ) : void
return void

OnLoad() public method

public OnLoad ( ConfigNode node ) : void
node System.ConfigNode
return void

OnPartDie() protected method

protected OnPartDie ( ) : void
return void

OnPartUnpack() public method

public OnPartUnpack ( ) : void
return void

OnSave() public method

public OnSave ( ConfigNode node ) : void
node System.ConfigNode
return void

OnStart() public method

public OnStart ( StartState state ) : void
state StartState
return void

OnUpdate() public method

public OnUpdate ( ) : void
return void

OnVesselGoOffRails() public method

public OnVesselGoOffRails ( Vessel vess ) : void
vess Vessel
return void

OnVesselGoOnRails() public method

public OnVesselGoOnRails ( Vessel vess ) : void
vess Vessel
return void

PlugHead() public method

public PlugHead ( KASModulePort portModule, PlugState plugMode, bool fromSave = false, bool fireSound = true, bool alreadyDocked = false ) : void
portModule KASModulePort
plugMode PlugState
fromSave bool
fireSound bool
alreadyDocked bool
return void

RefreshControlState() public method

public RefreshControlState ( ) : void
return void

SetCableJointConnectedBody() public method

public SetCableJointConnectedBody ( Rigidbody newBody ) : void
newBody UnityEngine.Rigidbody
return void

SetHeadToPhysic() public method

public SetHeadToPhysic ( bool active, bool delayPhysics = false ) : void
active bool
delayPhysics bool
return void

SetTubeRenderer() public method

public SetTubeRenderer ( bool activated ) : void
activated bool
return void

TogglePlugMode() public method

public TogglePlugMode ( ) : void
return void

UnplugHead() public method

public UnplugHead ( bool fireSound = true ) : void
fireSound bool
return void

Property Details

cableJoint public_oe property

public SpringJoint,UnityEngine cableJoint
return UnityEngine.SpringJoint

connectedPortInfo public_oe property

public PortInfo connectedPortInfo
return PortInfo

evaHolderPart public_oe property

public Part evaHolderPart
return Part

extend public_oe property

public KAS_Shared.cableControl,KAS extend
return KAS_Shared.cableControl

fxSndEject public_oe property

public FXGroup fxSndEject
return FXGroup

fxSndHeadGrab public_oe property

public FXGroup fxSndHeadGrab
return FXGroup

fxSndHeadLock public_oe property

public FXGroup fxSndHeadLock
return FXGroup

fxSndMotor public_oe property

public FXGroup fxSndMotor
return FXGroup

fxSndMotorStart public_oe property

public FXGroup fxSndMotorStart
return FXGroup

fxSndMotorStop public_oe property

public FXGroup fxSndMotorStop
return FXGroup

grabbedPortModule public_oe property

public KASModulePort,KAS grabbedPortModule
return KASModulePort

guiRepeatExtend public_oe property

public bool guiRepeatExtend
return bool

guiRepeatRetract public_oe property

public bool guiRepeatRetract
return bool

guiRepeatTurnLeft public_oe property

public bool guiRepeatTurnLeft
return bool

guiRepeatTurnRight public_oe property

public bool guiRepeatTurnRight
return bool

headPortNode public_oe property

public Transform,UnityEngine headPortNode
return UnityEngine.Transform

headTransform public_oe property

public Transform,UnityEngine headTransform
return UnityEngine.Transform

highLightStarted public_oe property

public bool highLightStarted
return bool

isActive public_oe property

public bool isActive
return bool

motorSpeed public_oe property

public float motorSpeed
return float

motorSpeedSetting public_oe property

public float motorSpeedSetting
return float

release public_oe property

public KAS_Shared.cableControl,KAS release
return KAS_Shared.cableControl

retract public_oe property

public KAS_Shared.cableControl,KAS retract
return KAS_Shared.cableControl

tubeRenderer public_oe property

public KAS_Tube,KAS tubeRenderer
return KAS.KAS_Tube