Back To Index

FloatingBar

Jump To Parameters
Jump To Function Definitions


Parameter Definitions

Select the parameter name from below to jump directly to it on this page.

allImages
allTexts
colorBarFillOffset
coloredBar
controller
displayBarNumber
displayTime
displayType
fadeOut
fadeSpeed
fillBar
fillDelay
fillSpeed
onlyEnableForNoneOwner
realTimeTracking
startHidden
type


allImages

All images to fade in and out

Exposed Value Type Default Value
protected Image[] new Image[] { }

Back To Top


allTexts

All texts to fade in and out

Exposed Value Type Default Value
protected Text[] new Text[] { }

Back To Top


colorBarFillOffset

If the bars are not quite the same size then you need to have the bars at a different fill amount.”
Use this offset to achieve this

Exposed Value Type Default Value
protected float 0.076f

Back To Top


coloredBar

The actual colored bar to resize according to the selected number.

Exposed Value Type Default Value
protected Image null

Back To Top


controller

Required if using real time tracking. Will always keep track of the “
values in the controller and update the bars for you.

Exposed Value Type Default Value
public vThirdPersonController null

Back To Top


displayBarNumber

The text to show based on the current value of your bar.

Exposed Value Type Default Value
protected Text null

Back To Top


displayTime

How long to display this UI before disabling it after a change (Only matters if fade out is true).

Exposed Value Type Default Value
protected float 6.0f

Back To Top


displayType

How to display your tracked number in the displayBarNumber field.\n\n”
Whole = Convert float to int.\n”
Percent = Convert the number to a percent value\n”
Raw = Display the raw tracked number

Exposed Value Type Default Value
protected NumberDisplayType NumberDisplayType.Percent

Back To Top


fadeOut

Instead of just turning off the elements you want to slowly fade this images out.

Exposed Value Type Default Value
protected bool true

Back To Top


fadeSpeed

How fast to fade the texts/images.

Exposed Value Type Default Value
protected float 0.4f

Back To Top


fillBar

Will adjust a set delay later after the colored bar.

Exposed Value Type Default Value
protected Image null

Back To Top


fillDelay

How long to wait before adjusting the fill bar.

Exposed Value Type Default Value
protected float 1.5f

Back To Top


fillSpeed

How fast to adjust the fill bar.

Exposed Value Type Default Value
protected float 0.4f

Back To Top


onlyEnableForNoneOwner

Only show this bar if this is a networked player that you are not controlling. (i.e. other players that are not you)

Exposed Value Type Default Value
protected bool true

Back To Top


realTimeTracking

If you want to have this function be the thing that is keeping “
track of the values. Uses the update method. Less efficent but saves “
you some extra work.

Exposed Value Type Default Value
protected bool true

Back To Top


startHidden

Will only display for set amount of time only if the tracked number changes.

Exposed Value Type Default Value
protected bool true

Back To Top


type

What type of floating bar is this?\n\n”
Health = Track the vThirdPersonController’s health.\n”
Stamina = Track the vThirdPersonController’s stamina\n”
Custom = Input a custom component that exposes a function called "CustomOutputValue" “
that outputs a float value for you to track.

Exposed Value Type Default Value
public FloatingBarType FloatingBarType.Health

Back To Top

Function Definitions

Select the function name from below to jump directly to it on this page.

Awake
DelayAdjustFillBar
DelayFadeElements
GetRemaining
GetWholeNumber
SetBarValue
SetElementsAlpha
Start
Update
UpdateMaxValue
UpdateTrackedValue


protected virtual void Awake()

Sets the starting fill amount and the starting alpha values.

Expose Value Overrideable Returns
protected True Does not return anything

No parameters

Back To Top


protected virtual IEnumerator DelayAdjustFillBar()

Makes it so the fill amount doesn’t adjust to the new amount for a few seconds. The wait time is based on the fillDelay parameter.

Expose Value Overrideable Returns
protected True Does not return anything

No parameters

Back To Top


protected virtual IEnumerator DelayFadeElements()

Will not fade the elements after changing for a few seconds. Then calls the SetElementsAlpha function.

Expose Value Overrideable Returns
protected True Does not return anything

No parameters

Back To Top


protected virtual float GetRemaining()

Returns a percentage float comparing the current with the max values.

Expose Value Overrideable Returns
protected True float percentage

No parameters

Back To Top


protected virtual int GetWholeNumber()

Returns the current value as a whole number

Expose Value Overrideable Returns
protected True whole number representing the current value

No parameters

Back To Top


protected virtual void SetBarValue()

Sets the text and fill amounts based on the displayType parameter.

Expose Value Overrideable Returns
protected True Does not return anything

No parameters

Back To Top


protected virtual void SetElementsAlpha(float setAlpha)

Sets the alpha values on the images and text elements in the allTexts and allImages list.

Expose Value Overrideable Returns
protected True Does not return anything
Parameter Name Description
setAlpha float type, the alpha value to set the elements to.

Back To Top


protected virtual void Start()

Finds and sets the bar values based on the current settings in the vThirdPersonController

Expose Value Overrideable Returns
protected True Does not return anything

No parameters

Back To Top


protected virtual void Update()

Dynamically updates the alpha and fill amount values based on changes in the vThirdPersonController and the settings on this component.

Expose Value Overrideable Returns
protected True Does not return anything

No parameters

Back To Top


public virtual void UpdateMaxValue(float value)

Can override the max value to compare against. This value is used to display percentages. This is normally the maxStamina or maxHealth values in the vThirdPersonController.

Expose Value Overrideable Returns
public True Does not return anything
Parameter Name Description
value *No found decription

Back To Top


public virtual void UpdateTrackedValue(float value)

Can override the value to be displayed. This is normally the currentHealth or currentStamina in the vThirdPersonController

Expose Value Overrideable Returns
public True Does not return anything
Parameter Name Description
value *No found decription

Back To Top