FAST SDK Coding Reference 1.0.3
Loading...
Searching...
No Matches
IdleTimer Class Reference

A timer that invokes a UnityEvent when time elapses or resets when there is interaction input. More...

Inheritance diagram for IdleTimer:
EventTimer

Protected Member Functions

override bool CheckForInterrupt ()
 Checks for any interaction input to determine if the timer will reset.
 
override void Start ()
 Registers with FAST.UdpConnection and FAST.SerialConnection for callbacks when data is recieved, then invokes the FAST.EventTimer.OnTimerElapsed event if FAST.EventTimer.triggerOnStart is set to true.
 
- Protected Member Functions inherited from EventTimer
bool CheckForInterrupt ()
 Checks for an interrupt condition to determine if the timer will reset.
 
virtual IEnumerator Timer ()
 The Coroutine function that waits for the timer to elapse and then invokes the FAST.EventTimer.OnTimerElapsed event.
 
virtual void Update ()
 Calls FAST.EventTimer.CheckForInterrupt() to determine if the timer will reset.
 

Private Attributes

bool checkKeyInput = true
 Inspector
Set to true if mouse button or key presses should reset the timer.
 
bool checkSerialInput = true
 Inspector
Set to true if serial communication should reset the timer.
 
bool checkTouchInput = true
 Inspector
Set to true if touches should reset the timer.
 
bool checkUdpInput = false
 Inspector
Set to true if UDP communication should reset the timer.
 

Additional Inherited Members

- Public Attributes inherited from EventTimer
UnityEvent OnTimerElapsed
 Inspector, Code
Calls the function(s) subscribed to this UnityEvent when the timer has elapsed.
 
- Protected Attributes inherited from EventTimer
float timerSeconds = 120f
 Inspector
The duration of the timer in seconds.
 
bool triggerOnStart = false
 Inspector
Set to true if the FAST.EventTimer.OnTimerElapsed event should be invoked during FAST.EventTimer.Start().
 

Detailed Description

A timer that invokes a UnityEvent when time elapses or resets when there is interaction input.

This can be used to determine if an activity is idle or being used by a visitor.

See also
UnityEngine.Events.UnityEvent

Member Function Documentation

◆ CheckForInterrupt()

override bool CheckForInterrupt ( )
protected

Checks for any interaction input to determine if the timer will reset.

Returns
true if there is input and the timer will reset, false if not.

◆ Start()

override void Start ( )
protectedvirtual

Registers with FAST.UdpConnection and FAST.SerialConnection for callbacks when data is recieved, then invokes the FAST.EventTimer.OnTimerElapsed event if FAST.EventTimer.triggerOnStart is set to true.

Reimplemented from EventTimer.

Member Data Documentation

◆ checkKeyInput

bool checkKeyInput = true
private

Inspector
Set to true if mouse button or key presses should reset the timer.

◆ checkSerialInput

bool checkSerialInput = true
private

Inspector
Set to true if serial communication should reset the timer.

◆ checkTouchInput

bool checkTouchInput = true
private

Inspector
Set to true if touches should reset the timer.

◆ checkUdpInput

bool checkUdpInput = false
private

Inspector
Set to true if UDP communication should reset the timer.


The documentation for this class was generated from the following file: