Class Timer
Timer used to set a maximum round time. Once it reaches zero, a method that depends on each BattleState is activated.
Namespace: AutoBattleFramework.Shop.ShopGUI
Assembly: cs.temp.dll.dll
Syntax
public class Timer : MonoBehaviour
  Fields
battle
Current battle reference.
Declaration
public Battle battle
  Field Value
| Type | Description | 
|---|---|
| Battle | 
timeRemaining
Time remaining until it reaches zero.
Declaration
public float timeRemaining
  Field Value
| Type | Description | 
|---|---|
| Single | 
timerIsRunning
If the timer is activated.
Declaration
public bool timerIsRunning
  Field Value
| Type | Description | 
|---|---|
| Boolean | 
timeText
Text showing the timeRemaining.
Declaration
public TMPro.TextMeshProUGUI timeText
  Field Value
| Type | Description | 
|---|---|
| TMPro.TextMeshProUGUI | 
Methods
DisplayTime(Single)
Updates the text with the timeRemaining.
Declaration
public virtual void DisplayTime(float timeToDisplay)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Single | timeToDisplay | Time remaining.  | 
      
ResetTimer(Single)
Set the timeRemaining with the given value. This function does not start the timer.
Declaration
public void ResetTimer(float time)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Single | time | New remaining time.  | 
      
StartTimer()
Starts the timer.
Declaration
public void StartTimer()
  StopTimer()
Stop the timer.
Declaration
public void StopTimer()