Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Expansions.Serenity.ControlledAction Class Reference

Class that manages a KSPAction that is being driven by ModuleRobiticController More...

Inheritance diagram for Expansions.Serenity.ControlledAction:
Expansions.Serenity.ControlledBase IConfigNode

Public Member Functions

 ControlledAction (ControlledAction sourceAction)
 
 ControlledAction (Part part, PartModule module, BaseAction action, ModuleRoboticController controller)
 
 ControlledAction ()
 
void RescaleTimes (float adjustmentRatio, float minSpace=0.01f)
 Scale the time of the points in a curve without changing the length More...
 
void ReverseTimes ()
 Reverse the timeValue curve direction More...
 
- Public Member Functions inherited from Expansions.Serenity.ControlledBase
void ChangeSymmetryMaster (Part newPart)
 Change the part that is listed as the one this axis is connected to to be another of its symmetry partners More...
 
void Load (ConfigNode node)
 
void Save (ConfigNode node)
 
void SetPartNickName (string newNickName)
 

Public Attributes

List< float > times
 The times the action will be triggered More...
 

Protected Member Functions

override void AddSymmetryPart (Part part)
 Called by base class when rebuilding symmetry list More...
 
override void ClearSymmetryLists ()
 Called by base class to clear different list types in child classes More...
 
override bool OnAssignReferenceVars ()
 Update all the reference vars More...
 
override bool OnChangeSymmetryMaster (Part newPart, out uint oldPartId)
 Change the part that is listed as the one this action is connected to to be another of its symmetry partners More...
 
override void OnLoad (ConfigNode node)
 
override void OnSave (ConfigNode node)
 

Properties

BaseAction Action [get, set]
 Reference to Field for this action More...
 
- Properties inherited from Expansions.Serenity.ControlledBase
ModuleRoboticController Controller [get, set]
 Reference to Controller for this axis More...
 
PartModule Module [get, set]
 Reference to PartModule for this axis More...
 
Part Part [get, set]
 Reference to part for this axis More...
 
string PartNickName [get]
 friendly text for a controlled axis More...
 
uint PartPersistentId [get]
 Helper to get the part persistentId More...
 
uint PersistentActionId [get]
 
List< PartSymmetryParts [get]
 The parts that are in symmetry with this one More...
 

Detailed Description

Class that manages a KSPAction that is being driven by ModuleRobiticController

Constructor & Destructor Documentation

Expansions.Serenity.ControlledAction.ControlledAction ( ControlledAction  sourceAction)
inline
Expansions.Serenity.ControlledAction.ControlledAction ( Part  part,
PartModule  module,
BaseAction  action,
ModuleRoboticController  controller 
)
inline
Expansions.Serenity.ControlledAction.ControlledAction ( )
inline

Member Function Documentation

override void Expansions.Serenity.ControlledAction.AddSymmetryPart ( Part  part)
inlineprotectedvirtual

Called by base class when rebuilding symmetry list

Parameters
partTHe part to add to the symmetry list

Implements Expansions.Serenity.ControlledBase.

override void Expansions.Serenity.ControlledAction.ClearSymmetryLists ( )
inlineprotectedvirtual

Called by base class to clear different list types in child classes

Implements Expansions.Serenity.ControlledBase.

override bool Expansions.Serenity.ControlledAction.OnAssignReferenceVars ( )
inlineprotectedvirtual

Update all the reference vars

Returns
True if we found the action and did it

Implements Expansions.Serenity.ControlledBase.

override bool Expansions.Serenity.ControlledAction.OnChangeSymmetryMaster ( Part  newPart,
out uint  oldPartId 
)
inlineprotectedvirtual

Change the part that is listed as the one this action is connected to to be another of its symmetry partners

Call this BEFORE the master part is deleted to maintain the symmetry groups

Parameters
newPartPart that will take over the role as symmetry master

Implements Expansions.Serenity.ControlledBase.

override void Expansions.Serenity.ControlledAction.OnLoad ( ConfigNode  node)
inlineprotectedvirtual
override void Expansions.Serenity.ControlledAction.OnSave ( ConfigNode  node)
inlineprotectedvirtual
void Expansions.Serenity.ControlledAction.RescaleTimes ( float  adjustmentRatio,
float  minSpace = 0.01f 
)
inline

Scale the time of the points in a curve without changing the length

Parameters
adjustmentRatioHow to calculate the new position of each time value
minSpaceThe min distance between points when the adjustmentRatio is spreading the points apart and we hit the end of the length
void Expansions.Serenity.ControlledAction.ReverseTimes ( )
inline

Reverse the timeValue curve direction

Member Data Documentation

List<float> Expansions.Serenity.ControlledAction.times

The times the action will be triggered

Property Documentation

BaseAction Expansions.Serenity.ControlledAction.Action
getset

Reference to Field for this action


The documentation for this class was generated from the following file: