Antura  1.1.0
Antura.UI.MinigamesUILives Class Reference

Shows the number of current and max lives available in a minigame. More...

Inheritance diagram for Antura.UI.MinigamesUILives:
Antura.UI.ABSMinigamesUIComponent

Public Member Functions

void Setup (int _maxLives)
 Sets the max lives. Call this before calling any other method. More...
 
int SetCurrLives (int _to, bool _canExceedMax=false)
 Sets the current lives to the given value and returns the value (representing the lives with a full heart). More...
 
int GainALife (bool _canExceedMax=false)
 Adds one life and retuns the current active ones (the ones with a full heart). If the new value is higher than MaxLives, new life objects are created and MaxLives is modified accordingly. More...
 
int LoseALife ()
 Removes one active life and retuns the current active ones (the ones with a full heart) More...
 
int ResetToMax ()
 Makes all life objects active (with a full heart) More...
 

Public Attributes

MinigamesUISingleLife LifePrefab
 

Properties

int MaxLives [get]
 
int CurrLives [get]
 
- Properties inherited from Antura.UI.ABSMinigamesUIComponent
bool IsSetup [get, protected set]
 
RectTransform RectTransform [get]
 

Additional Inherited Members

- Protected Member Functions inherited from Antura.UI.ABSMinigamesUIComponent
bool Validate (string _caller)
 

Detailed Description

Shows the number of current and max lives available in a minigame.

Member Function Documentation

◆ GainALife()

int Antura.UI.MinigamesUILives.GainALife ( bool  _canExceedMax = false)

Adds one life and retuns the current active ones (the ones with a full heart). If the new value is higher than MaxLives, new life objects are created and MaxLives is modified accordingly.

Parameters
_canExceedMaxIf TRUE and the new value is higher than MaxLives, new life objects are created and MaxLives is modified accordingly.

◆ LoseALife()

int Antura.UI.MinigamesUILives.LoseALife ( )

Removes one active life and retuns the current active ones (the ones with a full heart)

◆ ResetToMax()

int Antura.UI.MinigamesUILives.ResetToMax ( )

Makes all life objects active (with a full heart)

◆ SetCurrLives()

int Antura.UI.MinigamesUILives.SetCurrLives ( int  _to,
bool  _canExceedMax = false 
)

Sets the current lives to the given value and returns the value (representing the lives with a full heart).

Parameters
_toLives to set as active (with full heart)
_canExceedMaxIf TRUE and the new value is higher than MaxLives, new life objects are created and MaxLives is modified accordingly.

◆ Setup()

void Antura.UI.MinigamesUILives.Setup ( int  _maxLives)

Sets the max lives. Call this before calling any other method.

Parameters
_maxLivesMax lives

Member Data Documentation

◆ LifePrefab

MinigamesUISingleLife Antura.UI.MinigamesUILives.LifePrefab

Property Documentation

◆ CurrLives

int Antura.UI.MinigamesUILives.CurrLives
get

◆ MaxLives

int Antura.UI.MinigamesUILives.MaxLives
get

The documentation for this class was generated from the following file: