Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.Timer Class Reference

Public Member Functions

 Timer ()
 
 Timer (int[] idArray)
 
void SetDefaultState ()
 
void Update ()
 
void Start ()
 
void Resume (bool resetTicker)
 Resumes the Timer More...
 
void Stop ()
 
void ShowGUI ()
 

Static Public Member Functions

static string CreateSaveData (List< Timer > timers)
 Creates a save string containing the enabled state of a list of timers More...
 
static void LoadSaveData (string dataString)
 Restores the enabled states of the game's timers from a saved data string More...
 

Properties

int ID [get]
 
bool IsRunning [get]
 
float Progress [get]
 
float Value [get]
 
GVar Variable [get]
 
string Label [get]
 

Detailed Description

A value that can be changed over time

Constructor & Destructor Documentation

◆ Timer()

AC.Timer.Timer ( )

The default Constructor.

Member Function Documentation

◆ CreateSaveData()

static string AC.Timer.CreateSaveData ( List< Timer timers)
static

Creates a save string containing the enabled state of a list of timers

Parameters
timersThe timers to save
Returns
The save string

◆ LoadSaveData()

static void AC.Timer.LoadSaveData ( string  dataString)
static

Restores the enabled states of the game's timers from a saved data string

Parameters
dataStringThe data string to load

◆ Resume()

void AC.Timer.Resume ( bool  resetTicker)

Resumes the Timer

Parameters
resetTickerIf True, the ticker in between value updates is reset

◆ SetDefaultState()

void AC.Timer.SetDefaultState ( )

Sets the enabled state to the default value.

◆ Start()

void AC.Timer.Start ( )

Starts the Timer

◆ Stop()

void AC.Timer.Stop ( )

Stops the Timer

◆ Update()

void AC.Timer.Update ( )

Updates the Timer. This is called every frame by StateHandler.

Property Documentation

◆ ID

int AC.Timer.ID
get

The Timer's unique ID

◆ IsRunning

bool AC.Timer.IsRunning
get

If True, the Timer is running

◆ Label

string AC.Timer.Label
get

The Timer's Editor label

◆ Progress

float AC.Timer.Progress
get

The Timer's progress, as a decimal

◆ Value

float AC.Timer.Value
get

The Timer's current value

◆ Variable

GVar AC.Timer.Variable
get

The Timer's linked Global Variable