Loading...
Searching...
No Matches
PixelCrushers.TimedEvent Class Reference

Invokes an event after a specified duration. More...

Inheritance diagram for PixelCrushers.TimedEvent:
Collaboration diagram for PixelCrushers.TimedEvent:

Public Types

enum  TimingMode { Seconds , Frames }
 

Public Member Functions

virtual void StartTimer ()
 Starts the timer manually.
 
virtual void StartTimer (float duration)
 Starts the timer manually with a specified duration.
 
void DestroyUnityObject (UnityEngine.Object o)
 

Protected Member Functions

virtual void Start ()
 
virtual void OnDisable ()
 
virtual void CancelTimer ()
 Cancels the timer's current countdown.
 
virtual void TimeReached ()
 

Properties

TimingMode mode [get, set]
 Count duration in seconds or number of frames.
 
float duration [get, set]
 After starting timer, if Mode is Seconds, wait this many seconds before firing event.
 
int frames [get, set]
 After starting timer, if Mode is Frames, wait this many seconds before firing event.
 
bool activateOnStart [get, set]
 Start timer when this component starts.
 

Detailed Description

Invokes an event after a specified duration.

The timer can be configured to start when the script starts or manually.

Member Enumeration Documentation

◆ TimingMode

Enumerator
Seconds 
Frames 

Member Function Documentation

◆ CancelTimer()

virtual void PixelCrushers.TimedEvent.CancelTimer ( )
inlineprotectedvirtual

Cancels the timer's current countdown.

◆ DestroyUnityObject()

void PixelCrushers.TimedEvent.DestroyUnityObject ( UnityEngine::Object  o)
inline

◆ OnDisable()

virtual void PixelCrushers.TimedEvent.OnDisable ( )
inlineprotectedvirtual

◆ Start()

virtual void PixelCrushers.TimedEvent.Start ( )
inlineprotectedvirtual

◆ StartTimer() [1/2]

virtual void PixelCrushers.TimedEvent.StartTimer ( )
inlinevirtual

Starts the timer manually.

◆ StartTimer() [2/2]

virtual void PixelCrushers.TimedEvent.StartTimer ( float  duration)
inlinevirtual

Starts the timer manually with a specified duration.

Parameters
durationDuration to wait before invoking the event.

◆ TimeReached()

virtual void PixelCrushers.TimedEvent.TimeReached ( )
inlineprotectedvirtual

Property Documentation

◆ activateOnStart

bool PixelCrushers.TimedEvent.activateOnStart
getset

Start timer when this component starts.

◆ duration

float PixelCrushers.TimedEvent.duration
getset

After starting timer, if Mode is Seconds, wait this many seconds before firing event.

◆ frames

int PixelCrushers.TimedEvent.frames
getset

After starting timer, if Mode is Frames, wait this many seconds before firing event.

◆ mode

TimingMode PixelCrushers.TimedEvent.mode
getset

Count duration in seconds or number of frames.


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