C# 클래스 SSTUTools.SSTUModelSwitch

상속: PartModule, IPartMassModifier, IPartCostModifier
파일 보기 프로젝트 열기: shadowmage45/SSTULabs 1 사용 예제들

공개 메소드들

메소드 설명
GetModuleCost ( float defaultCost, ModifierStagingSituation sit ) : float
GetModuleCostChangeWhen ( ) : ModifierChangeWhen
GetModuleMass ( float defaultMass, ModifierStagingSituation sit ) : float
GetModuleMassChangeWhen ( ) : ModifierChangeWhen
OnLoad ( ConfigNode node ) : void
OnSave ( ConfigNode node ) : void
OnStart ( StartState state ) : void
Start ( ) : void
findGroup ( string name ) : ModelSwitchGroup

Locate the modelSwitchGroup for the input name -- UNSAFE - will KNFE for invalid name

onGroupUpdated ( BaseField field, object obj ) : void
onModelUpdated ( BaseField field, object obj ) : void

비공개 메소드들

메소드 설명
calcTotalVolume ( ) : float

Calculates the total allocated volume for ALL VolumeContianer sub-containers This is calculated as -liters-

calcVolume ( int containerIndex ) : float

Calculates the total allocated volume for a specific container index. This is calculated as -liters-

initialize ( ) : void

Initialize this module - load config data, restore persistent data, setup gui fields

updateAttachNodes ( bool userInput ) : void
updateAttachNodesForModel ( ModelSwitchData modelData ) : void
updateContainerVolume ( ) : void

Updates the associated VolumeContainer with any changes to part volume from this module

updateDragCube ( ) : void
updateGui ( ) : void

Update the currently avaialble selection options and enabled/disabled status of the group and model selection widgets

updateMassAndCost ( ) : void

Update the cached mass and cost for the -models- that are currently enabled; resources and tankage are handled by VolumeContainer

updatePersistentData ( ) : void

Update the persistent data field with the current configuration for this module; this is a set of enabled/disabled flags for each groups models

메소드 상세

GetModuleCost() 공개 메소드

public GetModuleCost ( float defaultCost, ModifierStagingSituation sit ) : float
defaultCost float
sit ModifierStagingSituation
리턴 float

GetModuleCostChangeWhen() 공개 메소드

public GetModuleCostChangeWhen ( ) : ModifierChangeWhen
리턴 ModifierChangeWhen

GetModuleMass() 공개 메소드

public GetModuleMass ( float defaultMass, ModifierStagingSituation sit ) : float
defaultMass float
sit ModifierStagingSituation
리턴 float

GetModuleMassChangeWhen() 공개 메소드

public GetModuleMassChangeWhen ( ) : ModifierChangeWhen
리턴 ModifierChangeWhen

OnLoad() 공개 메소드

public OnLoad ( ConfigNode node ) : void
node System.ConfigNode
리턴 void

OnSave() 공개 메소드

public OnSave ( ConfigNode node ) : void
node System.ConfigNode
리턴 void

OnStart() 공개 메소드

public OnStart ( StartState state ) : void
state StartState
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

findGroup() 공개 메소드

Locate the modelSwitchGroup for the input name -- UNSAFE - will KNFE for invalid name
public findGroup ( string name ) : ModelSwitchGroup
name string
리턴 ModelSwitchGroup

onGroupUpdated() 공개 메소드

public onGroupUpdated ( BaseField field, object obj ) : void
field BaseField
obj object
리턴 void

onModelUpdated() 공개 메소드

public onModelUpdated ( BaseField field, object obj ) : void
field BaseField
obj object
리턴 void