C# Class Antura.UI.MinigamesUILives

Shows the number of current and max lives available in a minigame.
Inheritance: Antura.UI.ABSMinigamesUIComponent
Datei anzeigen Open project: vgwb/Antura_arabic Class Usage Examples

Public Properties

Property Type Description
LifePrefab Antura.UI.MinigamesUISingleLife

Public Methods

Method Description
Awake ( ) : void
GainALife ( bool _canExceedMax = false ) : int

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.

LoseALife ( ) : int

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

ResetToMax ( ) : int

Makes all life objects active (with a full heart)

SetCurrLives ( int _to, bool _canExceedMax = false ) : int

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

Setup ( int _maxLives ) : void

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

Method Details

Awake() public method

public Awake ( ) : void
return void

GainALife() public method

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.
public GainALife ( bool _canExceedMax = false ) : int
_canExceedMax bool If TRUE and the new value is higher than , /// new life objects are created and is modified accordingly.
return int

LoseALife() public method

Removes one active life and retuns the current active ones (the ones with a full heart)
public LoseALife ( ) : int
return int

ResetToMax() public method

Makes all life objects active (with a full heart)
public ResetToMax ( ) : int
return int

SetCurrLives() public method

Sets the current lives to the given value and returns the value (representing the lives with a full heart).
public SetCurrLives ( int _to, bool _canExceedMax = false ) : int
_to int Lives to set as active (with full heart)
_canExceedMax bool If TRUE and the new value is higher than , /// new life objects are created and is modified accordingly.
return int

Setup() public method

Sets the max lives. Call this before calling any other method.
public Setup ( int _maxLives ) : void
_maxLives int Max lives
return void

Property Details

LifePrefab public_oe property

public MinigamesUISingleLife,Antura.UI LifePrefab
return Antura.UI.MinigamesUISingleLife