Search Results for

    Show / Hide Table of Contents

    Class ProgressBarRegenerationText

    Update the regeneration text values of the Progress Bar, the amount, the tickrate, the float format etc.

    Inheritance
    object
    ProgressBarRegenerationText
    Namespace: TetraCreations.ProgressBarSystem
    Assembly: cs.temp.dll.dll
    Syntax
    [Serializable]
    public class ProgressBarRegenerationText

    Fields

    _amountBindingKey

    Declaration
    protected readonly string _amountBindingKey
    Field Value
    Type Description
    string

    _canvasGroup

    Declaration
    protected CanvasGroup _canvasGroup
    Field Value
    Type Description
    CanvasGroup

    _display

    Declaration
    protected RegenerationDisplay _display
    Field Value
    Type Description
    RegenerationDisplay

    _enabled

    Declaration
    protected bool _enabled
    Field Value
    Type Description
    bool

    _font

    Declaration
    protected TMP_FontAsset _font
    Field Value
    Type Description
    TMP_FontAsset

    _fontColor

    Declaration
    protected Color _fontColor
    Field Value
    Type Description
    Color

    _fontSize

    Declaration
    protected float _fontSize
    Field Value
    Type Description
    float

    _initialized

    Declaration
    protected bool _initialized
    Field Value
    Type Description
    bool

    _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
    Type Description
    string

    DisableGroupWhenHiddingText

    Declaration
    public bool DisableGroupWhenHiddingText
    Field Value
    Type Description
    bool

    FloatFormat

    Declaration
    public string FloatFormat
    Field Value
    Type Description
    string

    Format

    Declaration
    public string Format
    Field Value
    Type Description
    string

    IntervalPerSecond

    Declaration
    public bool IntervalPerSecond
    Field Value
    Type Description
    bool

    TickrateFloatFormat

    Declaration
    public string TickrateFloatFormat
    Field Value
    Type Description
    string

    UseSignAsPrefix

    Declaration
    public bool UseSignAsPrefix
    Field Value
    Type Description
    bool

    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
    Type Description
    RegenerationDisplay

    Enabled

    If Enabled is false, this script cannot be initialized.
    And the text will be hidden.

    Declaration
    public bool Enabled { get; }
    Property Value
    Type Description
    bool

    Font

    Get/Set the Text mesh pro font asset.

    Declaration
    public TMP_FontAsset Font { get; set; }
    Property Value
    Type Description
    TMP_FontAsset

    FontColor

    Get/Set the font color.

    Declaration
    public Color FontColor { get; set; }
    Property Value
    Type Description
    Color

    FontSize

    Get/Set the font size of the regeneration values.

    Declaration
    public float FontSize { get; set; }
    Property Value
    Type Description
    float

    Initialized

    Does the script has been initialized by the Progress Bar.

    Declaration
    public bool Initialized { get; }
    Property Value
    Type Description
    bool

    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
    Type Description
    string

    GetValueAsString()

    Get the current value regeneration as string, eventually with the sign.

    Declaration
    protected virtual string GetValueAsString()
    Returns
    Type Description
    string

    Hide()

    Hide the text of the current regeneration.

    Declaration
    public void Hide()

    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
    Type Name Description
    object sender
    RegenerationValuesEventArgs args

    SetVisibility(RegenerationDisplay)

    Set the a new RegenerationDisplay value to hide or show the regeneration values.

    Declaration
    public void SetVisibility(RegenerationDisplay regenerationDisplay)
    Parameters
    Type Name Description
    RegenerationDisplay regenerationDisplay

    Show()

    Show the text of the current regeneration.

    Declaration
    public void Show()

    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
    Type Description
    System.EventHandler<TEventArgs><ProgressBarRegenerationInitializedEventArgs>
    In This Article
    Back to top Tetra Creations documentation