Class ProgressBarRegenerationText
Update the regeneration text values of the Progress Bar, the amount, the tickrate, the float format etc.
Inheritance
object
ProgressBarRegenerationText
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class ProgressBarRegenerationText
Fields
_amountBindingKey
Declaration
protected readonly string _amountBindingKey
Field Value
_canvasGroup
Declaration
protected CanvasGroup _canvasGroup
Field Value
| Type |
Description |
| CanvasGroup |
|
_display
Declaration
protected RegenerationDisplay _display
Field Value
_enabled
Declaration
Field Value
_font
Declaration
protected TMP_FontAsset _font
Field Value
| Type |
Description |
| TMP_FontAsset |
|
_fontColor
Declaration
protected Color _fontColor
Field Value
_fontSize
Declaration
protected float _fontSize
Field Value
_initialized
Declaration
protected bool _initialized
Field Value
_regenerationValues
Declaration
protected GameObject _regenerationValues
Field Value
| Type |
Description |
| GameObject |
|
_textRegenerationValues
Declaration
protected TextMeshProUGUI _textRegenerationValues
Field Value
| Type |
Description |
| TextMeshProUGUI |
|
_textSign
Declaration
protected TextMeshProUGUI _textSign
Field Value
| Type |
Description |
| TextMeshProUGUI |
|
_tickrateBindingKey
Declaration
protected readonly string _tickrateBindingKey
Field Value
DisableGroupWhenHiddingText
Declaration
public bool DisableGroupWhenHiddingText
Field Value
FloatFormat
Declaration
public string FloatFormat
Field Value
Format
Declaration
Field Value
IntervalPerSecond
Declaration
public bool IntervalPerSecond
Field Value
TickrateFloatFormat
Declaration
public string TickrateFloatFormat
Field Value
UseSignAsPrefix
Declaration
public bool UseSignAsPrefix
Field Value
Properties
Display
Determines whether regeneration values are hidden, always visble, hidden or disabled when the regeneration stops.
Declaration
public RegenerationDisplay Display { get; set; }
Property Value
Enabled
If Enabled is false, this script cannot be initialized.
And the text will be hidden.
Declaration
public bool Enabled { get; }
Property Value
Font
Get/Set the Text mesh pro font asset.
Declaration
public TMP_FontAsset Font { get; set; }
Property Value
| Type |
Description |
| TMP_FontAsset |
|
FontColor
Declaration
public Color FontColor { get; set; }
Property Value
FontSize
Get/Set the font size of the regeneration values.
Declaration
public float FontSize { get; set; }
Property Value
Initialized
Does the script has been initialized by the Progress Bar.
Declaration
public bool Initialized { get; }
Property Value
TextsGroup
The GameObject regrouping all text mesh pro components.
Declaration
public GameObject TextsGroup { get; set; }
Property Value
| Type |
Description |
| GameObject |
|
Methods
GetTickRateAsString()
Get the current tick rate as string, returns an empty string if it's close to 1 second.
Declaration
protected virtual string GetTickRateAsString()
Returns
GetValueAsString()
Get the current value regeneration as string, eventually with the sign.
Declaration
protected virtual string GetValueAsString()
Returns
Hide()
Hide the text of the current regeneration.
Declaration
Initialize()
Declaration
public virtual void Initialize()
OnInitializedEvent()
Raise the InitializedEvent
Declaration
protected virtual void OnInitializedEvent()
ResetVisibility()
Hide the regeneration values, show them if the RegenerationDisplay is set the Show.
This is called when changing Progress Bar to re-initialize the text.
Declaration
public void ResetVisibility()
SetValues(object, RegenerationValuesEventArgs)
RegenerationValuesChangedEvent callback, it updates the text value of the regeneration.
Declaration
public virtual void SetValues(object sender, RegenerationValuesEventArgs args)
Parameters
SetVisibility(RegenerationDisplay)
Set the a new RegenerationDisplay value to hide or show the regeneration values.
Declaration
public void SetVisibility(RegenerationDisplay regenerationDisplay)
Parameters
Show()
Show the text of the current regeneration.
Declaration
UpdateTextValue()
Format the current value, set the sign and the interval as string.
Declaration
protected virtual void UpdateTextValue()
Events
InitializedEvent
Raised in Initialize() method when the ProgressBarRegeneration is ready.
Declaration
public event EventHandler<ProgressBarRegenerationInitializedEventArgs> InitializedEvent
Event Type