Add this bar to an object and link it to a bar (possibly the same object the script is on), and you'll be able to resize the bar object based on a current value, located between a min and max value. See the HealthBar.cs script for a use case
More...
|
virtual void | UpdateBar (float currentValue, float minValue, float maxValue) |
| Updates the bar's values based on the specified parameters More...
|
|
virtual void | Bump () |
| Triggers a camera bump More...
|
|
|
float | StartValue = 0f |
| the local scale or fillamount value to reach when the bar is empty More...
|
|
float | EndValue = 1f |
| the local scale or fillamount value to reach when the bar is full More...
|
|
BarDirections | BarDirection = BarDirections.LeftToRight |
| the direction this bar moves to More...
|
|
FillModes | FillMode = FillModes.LocalScale |
| the foreground bar's fill mode More...
|
|
TimeScales | TimeScale = TimeScales.UnscaledTime |
| defines whether the bar will work on scaled or unscaled time (whether or not it'll keep moving if time is slowed down for example) More...
|
|
bool | LerpForegroundBar = true |
| whether or not the foreground bar should lerp More...
|
|
float | LerpForegroundBarSpeed = 15f |
| the speed at which to lerp the foreground bar More...
|
|
float | Delay = 1f |
| the delay before the delayed bar moves (in seconds) More...
|
|
bool | LerpDelayedBar = true |
| whether or not the delayed bar's animation should lerp More...
|
|
float | LerpDelayedBarSpeed = 15f |
| the speed at which to lerp the delayed bar More...
|
|
string | PlayerID |
| optional - the ID of the player associated to this bar More...
|
|
Transform | DelayedBar |
| the delayed bar More...
|
|
Transform | ForegroundBar |
| the main, foreground bar More...
|
|
bool | BumpScaleOnChange = true |
| whether or not the bar should "bump" when changing value More...
|
|
bool | BumpOnIncrease = false |
| whether or not the bar should bump when its value increases More...
|
|
float | BumpDuration = 0.2f |
| the duration of the bump animation More...
|
|
bool | ChangeColorWhenBumping = true |
| whether or not the bar should flash when bumping More...
|
|
Color | BumpColor = Color.white |
| the color to apply to the bar when bumping More...
|
|
AnimationCurve | BumpAnimationCurve = new AnimationCurve(new Keyframe(1, 1), new Keyframe(0.3f, 1.05f), new Keyframe(1, 1)) |
| the curve to map the bump animation on More...
|
|
AnimationCurve | BumpColorAnimationCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0)) |
| the curve to map the bump animation color animation on More...
|
|
bool | AutoUpdating = false |
| whether or not this progress bar should update itself every update (if not, you'll have to update it using the UpdateBar method More...
|
|
float | BarProgress |
| the current progress of the bar More...
|
|
|
bool | Bumping [get, protected set] |
| whether or not the bar is bumping right now More...
|
|
Add this bar to an object and link it to a bar (possibly the same object the script is on), and you'll be able to resize the bar object based on a current value, located between a min and max value. See the HealthBar.cs script for a use case
◆ BarDirections
the possible directions for the fill (for local scale and fill amount only)
Enumerator |
---|
LeftToRight | |
RightToLeft | |
UpToDown | |
DownToUp | |
◆ FillModes
the possible fill modes
Enumerator |
---|
LocalScale | |
FillAmount | |
Width | |
Height | |
◆ TimeScales
the possible timescales the bar can work on
Enumerator |
---|
UnscaledTime | |
Time | |
◆ AutoUpdate()
virtual void Lofelt.NiceVibrations.MMProgressBar.AutoUpdate |
( |
| ) |
|
|
protectedvirtual |
◆ Bump()
virtual void Lofelt.NiceVibrations.MMProgressBar.Bump |
( |
| ) |
|
|
virtual |
◆ BumpCoroutine()
virtual IEnumerator Lofelt.NiceVibrations.MMProgressBar.BumpCoroutine |
( |
| ) |
|
|
protectedvirtual |
A coroutine that (usually quickly) changes the scale of the bar
- Returns
- The coroutine.
◆ Remap()
virtual float Lofelt.NiceVibrations.MMProgressBar.Remap |
( |
float |
x, |
|
|
float |
A, |
|
|
float |
B, |
|
|
float |
C, |
|
|
float |
D |
|
) |
| |
|
protectedvirtual |
◆ Start()
virtual void Lofelt.NiceVibrations.MMProgressBar.Start |
( |
| ) |
|
|
protectedvirtual |
On start we store our image component
◆ Update()
virtual void Lofelt.NiceVibrations.MMProgressBar.Update |
( |
| ) |
|
|
protectedvirtual |
On Update we update our bars
◆ UpdateBar()
virtual void Lofelt.NiceVibrations.MMProgressBar.UpdateBar |
( |
float |
currentValue, |
|
|
float |
minValue, |
|
|
float |
maxValue |
|
) |
| |
|
virtual |
Updates the bar's values based on the specified parameters
- Parameters
-
currentValue | Current value. |
minValue | Minimum value. |
maxValue | Max value. |
◆ UpdateDelayedBar()
virtual void Lofelt.NiceVibrations.MMProgressBar.UpdateDelayedBar |
( |
| ) |
|
|
protectedvirtual |
Updates the delayed bar's scale
◆ UpdateFrontBar()
virtual void Lofelt.NiceVibrations.MMProgressBar.UpdateFrontBar |
( |
| ) |
|
|
protectedvirtual |
Updates the front bar's scale
◆ _bump
bool Lofelt.NiceVibrations.MMProgressBar._bump = false |
|
protected |
◆ _delayedImage
Image Lofelt.NiceVibrations.MMProgressBar._delayedImage |
|
protected |
◆ _foregroundImage
Image Lofelt.NiceVibrations.MMProgressBar._foregroundImage |
|
protected |
◆ _initialColor
Color Lofelt.NiceVibrations.MMProgressBar._initialColor |
|
protected |
◆ _initialFrontBarSize
Vector2 Lofelt.NiceVibrations.MMProgressBar._initialFrontBarSize |
|
protected |
◆ _initialized
bool Lofelt.NiceVibrations.MMProgressBar._initialized |
|
protected |
◆ _initialScale
Vector3 Lofelt.NiceVibrations.MMProgressBar._initialScale |
|
protected |
◆ _lastPercent
float Lofelt.NiceVibrations.MMProgressBar._lastPercent |
|
protected |
◆ _lastUpdateTimestamp
float Lofelt.NiceVibrations.MMProgressBar._lastUpdateTimestamp |
|
protected |
◆ _newPercent
float Lofelt.NiceVibrations.MMProgressBar._newPercent |
|
protected |
◆ _newScale
Vector3 Lofelt.NiceVibrations.MMProgressBar._newScale |
|
protected |
◆ _targetFill
float Lofelt.NiceVibrations.MMProgressBar._targetFill |
|
protected |
◆ _targetLocalScale
Vector3 Lofelt.NiceVibrations.MMProgressBar._targetLocalScale = Vector3.one |
|
protected |
◆ AutoUpdating
bool Lofelt.NiceVibrations.MMProgressBar.AutoUpdating = false |
whether or not this progress bar should update itself every update (if not, you'll have to update it using the UpdateBar method
◆ BarDirection
the direction this bar moves to
◆ BarProgress
float Lofelt.NiceVibrations.MMProgressBar.BarProgress |
the current progress of the bar
◆ BumpAnimationCurve
AnimationCurve Lofelt.NiceVibrations.MMProgressBar.BumpAnimationCurve = new AnimationCurve(new Keyframe(1, 1), new Keyframe(0.3f, 1.05f), new Keyframe(1, 1)) |
the curve to map the bump animation on
◆ BumpColor
Color Lofelt.NiceVibrations.MMProgressBar.BumpColor = Color.white |
the color to apply to the bar when bumping
◆ BumpColorAnimationCurve
AnimationCurve Lofelt.NiceVibrations.MMProgressBar.BumpColorAnimationCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0)) |
the curve to map the bump animation color animation on
◆ BumpDuration
float Lofelt.NiceVibrations.MMProgressBar.BumpDuration = 0.2f |
the duration of the bump animation
◆ BumpOnIncrease
bool Lofelt.NiceVibrations.MMProgressBar.BumpOnIncrease = false |
whether or not the bar should bump when its value increases
◆ BumpScaleOnChange
bool Lofelt.NiceVibrations.MMProgressBar.BumpScaleOnChange = true |
whether or not the bar should "bump" when changing value
◆ ChangeColorWhenBumping
bool Lofelt.NiceVibrations.MMProgressBar.ChangeColorWhenBumping = true |
whether or not the bar should flash when bumping
◆ Delay
float Lofelt.NiceVibrations.MMProgressBar.Delay = 1f |
the delay before the delayed bar moves (in seconds)
◆ DelayedBar
Transform Lofelt.NiceVibrations.MMProgressBar.DelayedBar |
◆ EndValue
float Lofelt.NiceVibrations.MMProgressBar.EndValue = 1f |
the local scale or fillamount value to reach when the bar is full
◆ FillMode
the foreground bar's fill mode
◆ ForegroundBar
Transform Lofelt.NiceVibrations.MMProgressBar.ForegroundBar |
◆ LerpDelayedBar
bool Lofelt.NiceVibrations.MMProgressBar.LerpDelayedBar = true |
whether or not the delayed bar's animation should lerp
◆ LerpDelayedBarSpeed
float Lofelt.NiceVibrations.MMProgressBar.LerpDelayedBarSpeed = 15f |
the speed at which to lerp the delayed bar
◆ LerpForegroundBar
bool Lofelt.NiceVibrations.MMProgressBar.LerpForegroundBar = true |
whether or not the foreground bar should lerp
◆ LerpForegroundBarSpeed
float Lofelt.NiceVibrations.MMProgressBar.LerpForegroundBarSpeed = 15f |
the speed at which to lerp the foreground bar
◆ PlayerID
string Lofelt.NiceVibrations.MMProgressBar.PlayerID |
optional - the ID of the player associated to this bar
◆ StartValue
float Lofelt.NiceVibrations.MMProgressBar.StartValue = 0f |
the local scale or fillamount value to reach when the bar is empty
◆ TimeScale
defines whether the bar will work on scaled or unscaled time (whether or not it'll keep moving if time is slowed down for example)
◆ Bumping
bool Lofelt.NiceVibrations.MMProgressBar.Bumping |
|
getprotected set |
whether or not the bar is bumping right now
The documentation for this class was generated from the following file:
- F:/Github/Store/Feel/Assets/Feel/NiceVibrations/Demo/_Common/Scripts/UI/MMProgressBar.cs