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[] { } |
allTexts
All texts to fade in and out
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Text[] | new Text[] { } |
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 |
coloredBar
The actual colored bar to resize according to the selected number.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Image | null |
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 |
displayBarNumber
The text to show based on the current value of your bar.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Text | null |
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 |
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 |
fadeOut
Instead of just turning off the elements you want to slowly fade this images out.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | bool | true |
fadeSpeed
How fast to fade the texts/images.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | float | 0.4f |
fillBar
Will adjust a set delay later after the colored bar.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | Image | null |
fillDelay
How long to wait before adjusting the fill bar.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | float | 1.5f |
fillSpeed
How fast to adjust the fill bar.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | float | 0.4f |
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 |
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 |
startHidden
Will only display for set amount of time only if the tracked number changes.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | bool | true |
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 |
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
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
fillDelayparameter.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
protected virtual IEnumerator DelayFadeElements()
Will not fade the elements after changing for a few seconds. Then calls the
SetElementsAlphafunction.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
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
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
protected virtual void SetBarValue()
Sets the text and fill amounts based on the
displayTypeparameter.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
protected virtual void SetElementsAlpha(float setAlpha)
Sets the alpha values on the images and text elements in the
allTextsandallImageslist.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| setAlpha | float type, the alpha value to set the elements to. |
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
protected virtual void Update()
Dynamically updates the alpha and fill amount values based on changes in the
vThirdPersonControllerand the settings on this component.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
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
maxStaminaormaxHealthvalues in thevThirdPersonController.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| value | *No found decription |
public virtual void UpdateTrackedValue(float value)
Can override the value to be displayed. This is normally the
currentHealthorcurrentStaminain thevThirdPersonController
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| value | *No found decription |