Search Results for

    Show / Hide Table of Contents

    Class AxisCounter

    AxisCounter serves as a tool for implementing logic based on counting and altering numerical values.

    Inheritance
    object
    AxisMonoBehaviour
    AxisGameObject
    AxisCounter
    Inherited Members
    AxisMonoBehaviour.ContainsLabel(string)
    AxisMonoBehaviour.CountChildrenWithLabel(string, bool)
    AxisMonoBehaviour.ContainsLabelInChildren(string, bool)
    AxisMonoBehaviour.GetSpaceBetweenColliders(AxisMonoBehaviour)
    AxisMonoBehaviour.GetSpaceBetweenCollidersHorizontally(AxisMonoBehaviour)
    AxisMonoBehaviour.PauseGame()
    AxisMonoBehaviour.SetActiveByName(string)
    AxisMonoBehaviour.ResumeGame()
    AxisMonoBehaviour.GameTimeScaleSet(float)
    AxisMonoBehaviour.transform
    AxisMonoBehaviour.gameObject
    AxisMonoBehaviour.collider
    AxisMonoBehaviour.Origin
    AxisMonoBehaviour.OnTransformChildrenChanged()
    Namespace: Axis.Logic
    Assembly: cs.temp.dll.dll
    Syntax
    public sealed class AxisCounter : AxisGameObject

    Fields

    Counters

    Public static list of active Counters in the scene

    Declaration
    public static List<AxisCounter> Counters
    Field Value
    Type Description
    System.Collections.Generic.List<T><AxisCounter>
    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    OnCounter

    List of unity events associated with counters

    Declaration
    public CounterEvents OnCounter
    Field Value
    Type Description
    CounterEvents
    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    PersistValue

    Defines wether value should be kept between scenes or sessions.

    Declaration
    public CounterPersistence PersistValue
    Field Value
    Type Description
    CounterPersistence
    Remarks

    Remember: The persistence accounts for GameObject name to consider same counter.

    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    ValueMax

    Max value counter can reach

    Declaration
    public int ValueMax
    Field Value
    Type Description
    int
    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    ValueMin

    Min value counter can reach

    Declaration
    public int ValueMin
    Field Value
    Type Description
    int
    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    Properties

    value

    [read-only] Current value

    Declaration
    public int value { get; }
    Property Value
    Type Description
    int
    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    Methods

    CopyValue(AxisCounter)

    Copy value from another AxisCounter

    Declaration
    public void CopyValue(AxisCounter counter)
    Parameters
    Type Name Description
    AxisCounter counter
    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    Down(int)

    Subtracts number from current value

    Declaration
    public void Down(int value = 1)
    Parameters
    Type Name Description
    int value

    Amount to subtract

    Remarks

    Negative values will automatically count as an Up (sum)

    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    Freeze()

    Freezing the AxisCounter it will ignore any change attempt, and keep same value

    Declaration
    public void Freeze()
    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    SyncValue(int)

    Force the execution of a change to set specific value

    Declaration
    public void SyncValue(int valueTo)
    Parameters
    Type Name Description
    int valueTo
    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    Unfreeze()

    Unfreezing the AxisCounter it will allow value changes

    Declaration
    public void Unfreeze()
    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    Up(int)

    Sums number to current value

    Declaration
    public void Up(int value = 1)
    Parameters
    Type Name Description
    int value

    Amount to sum

    Remarks

    Negative values will automatically count as a Down (subtract)

    See Also
    AxisCounterMatchCondition
    AxisCounterUI

    See Also

    AxisCounterMatchCondition
    AxisCounterUI
    In This Article
    Back to top Axis 1.0.0