Adventure Creator 1.84.3
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2024
Loading...
Searching...
No Matches
AC.Timer Class Reference

Public Member Functions

 Timer ()
 Timer (int[] idArray)
void SetDefaultState ()
string GetFormattedValue ()
void Update ()
void Start ()
void Resume (bool resetTicker)
 Resumes the Timer.
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.
static void LoadSaveData (string dataString)
 Restores the enabled states of the game's timers from a saved data string.

Properties

int ID [get]
bool IsRunning [get]
float MinValue [get, set]
float MaxValue [get, set]
float Progress [get]
float Value [get, set]
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()

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

◆ GetFormattedValue()

string AC.Timer.GetFormattedValue ( )

Returns the value, formatted into a readable format

◆ LoadSaveData()

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

◆ MaxValue

float AC.Timer.MaxValue
getset

The Timer's maximum value

◆ MinValue

float AC.Timer.MinValue
getset

The Timer's minimum value

◆ Progress

float AC.Timer.Progress
get

The Timer's progress, as a decimal

◆ Value

float AC.Timer.Value
getset

The Timer's current value

◆ Variable

GVar AC.Timer.Variable
get

The Timer's linked Global Variable