Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
KSP.UI.Screens.SpriteTumblerObject Class Reference
Inheritance diagram for KSP.UI.Screens.SpriteTumblerObject:

Public Member Functions

delegate void afterAltModeTumbleTo (double n, int tumble)
 This is a delegate that will be called AFTER every time TumbleTo method is called. More...
 
delegate void afterAltModeUpdateDelta (float deltaTime, float sharpness)
 This is a delegate that will be called AFTER every time UpdateDelta method is called. More...
 
void TumbleTo (double n, int tumble)
 Set the Tumbler to an index value in the images array. More...
 
void UpdateDelta (float deltaTime, float sharpness)
 This is called every LateUpdate() and will set the currRot value and moves the images and colobar anchoredPositions towards the tgtRot. More...
 

Public Attributes

RectTransform colorBar
 This is the color bar that appears behind the sprites. More...
 
float colorBarCurrent
 
float colorBarSection = 28f
 The Y size of a section in the colorBar More...
 
float colorBarTarget
 
double currRot = 36.0f
 This is the Current Rotation of the tumbler. More...
 
float IconSection = 36.0f
 The Y size of an Icon in the colorBar More...
 
RectTransform[] images
 This is the tumbler Images. There is an extra one at the top and bottom of the array that represent the ones the tumbler can't actually reach but are visible at the top and bottom of the tumbler when the index is at the min or max value. More...
 
double N
 This is the Numeric indicator for deciding if the tumbler scrolls up or down (passed into TumbleTo) More...
 
Sprite[] sprites
 These are the Actual Icon Sprites. They should be in order they appear in the images array. More...
 
double tgtRot
 This is the Target Rotation the tumbler is aiming for. More...
 
bool tumbling
 True if the tumbler is currently tumbling towards an index value. More...
 

Static Public Attributes

static afterAltModeUpdateDelta AfterAltModeUpdateDelta
 This is a delegate that will be called AFTER every time UpdateDelta method is called. Set this to your Delegate Instance. More...
 
static afterAltModeTumbleTo AfterAltTumbleTo
 This is a delegate that will be called AFTER every time TumbleTo method is called. Set this to your Delegate Instance. More...
 

Member Function Documentation

delegate void KSP.UI.Screens.SpriteTumblerObject.afterAltModeTumbleTo ( double  n,
int  tumble 
)

This is a delegate that will be called AFTER every time TumbleTo method is called.

Parameters
nThe index value to move to
tumblethe Direction Indicator. 0 = up, 1 = down. See also
delegate void KSP.UI.Screens.SpriteTumblerObject.afterAltModeUpdateDelta ( float  deltaTime,
float  sharpness 
)

This is a delegate that will be called AFTER every time UpdateDelta method is called.

Parameters
deltaTimeThis is the deltatime since last call.
sharpnessThis is the sharpness value. (Use this for handling TimeWarp tumbling)
void KSP.UI.Screens.SpriteTumblerObject.TumbleTo ( double  n,
int  tumble 
)
inline

Set the Tumbler to an index value in the images array.

Parameters
nThe index value to move to
tumblethe Direction Indicator. 0 = up, 1 = down. See also
void KSP.UI.Screens.SpriteTumblerObject.UpdateDelta ( float  deltaTime,
float  sharpness 
)
inline

This is called every LateUpdate() and will set the currRot value and moves the images and colobar anchoredPositions towards the tgtRot.

Parameters
deltaTimeThis is the deltatime since last call.
sharpnessThis is the sharpness value. (Use this for handling TimeWarp tumbling)

Member Data Documentation

afterAltModeUpdateDelta KSP.UI.Screens.SpriteTumblerObject.AfterAltModeUpdateDelta
static

This is a delegate that will be called AFTER every time UpdateDelta method is called. Set this to your Delegate Instance.

afterAltModeTumbleTo KSP.UI.Screens.SpriteTumblerObject.AfterAltTumbleTo
static

This is a delegate that will be called AFTER every time TumbleTo method is called. Set this to your Delegate Instance.

RectTransform KSP.UI.Screens.SpriteTumblerObject.colorBar

This is the color bar that appears behind the sprites.

float KSP.UI.Screens.SpriteTumblerObject.colorBarCurrent
float KSP.UI.Screens.SpriteTumblerObject.colorBarSection = 28f

The Y size of a section in the colorBar

float KSP.UI.Screens.SpriteTumblerObject.colorBarTarget
double KSP.UI.Screens.SpriteTumblerObject.currRot = 36.0f

This is the Current Rotation of the tumbler.

float KSP.UI.Screens.SpriteTumblerObject.IconSection = 36.0f

The Y size of an Icon in the colorBar

RectTransform [] KSP.UI.Screens.SpriteTumblerObject.images

This is the tumbler Images. There is an extra one at the top and bottom of the array that represent the ones the tumbler can't actually reach but are visible at the top and bottom of the tumbler when the index is at the min or max value.

double KSP.UI.Screens.SpriteTumblerObject.N

This is the Numeric indicator for deciding if the tumbler scrolls up or down (passed into TumbleTo)

Sprite [] KSP.UI.Screens.SpriteTumblerObject.sprites

These are the Actual Icon Sprites. They should be in order they appear in the images array.

double KSP.UI.Screens.SpriteTumblerObject.tgtRot

This is the Target Rotation the tumbler is aiming for.

bool KSP.UI.Screens.SpriteTumblerObject.tumbling

True if the tumbler is currently tumbling towards an index value.


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