Class GameTimer
This class manages the game's countdown timer. It starts, updates, and stops the timer, and ends the game when time runs out.
Inheritance
object
GameTimer
Namespace: Game
Assembly: cs.temp.dll.dll
Syntax
public class GameTimer : MonoBehaviour
Fields
startTime
The starting time for the timer, in seconds.
Declaration
public float startTime
Field Value
| Type | Description |
|---|---|
| float |
timerText
The UI text element that displays the timer.
Declaration
public Text timerText
Field Value
| Type | Description |
|---|---|
| Text |
Methods
StartTimer()
Starts the timer if it is not already running.
Declaration
public void StartTimer()