Timer class

C# | Visual Basic | Visual C++ |
public class Timer : EventDispatcher
Public Class Timer _ Inherits EventDispatcher
public ref class Timer : public EventDispatcher

All Members | Constructors | Methods | Properties | Fields | |
Icon | Member | Description |
---|---|---|
![]() | Timer()()()() |
Constructor
|
![]() | Timer(Single) |
Constructor
|
![]() | Timer(Single, Int32) |
Constructor
|
![]() | AddEventListener(String, EventHandler, EventPhase, Int32) |
Adds the event listener
(Inherited from EventDispatcher.) |
![]() | AddEventListener(String, EventHandler, EventPhase) |
Adds the event listener
(Inherited from EventDispatcher.) |
![]() | AddEventListener(String, EventHandler) |
AddEventListener Overload
Assumes that useCapturePhase is false
(Inherited from EventDispatcher.) |
![]() | AddEventListener(String, EventHandler, Int32) |
Adds the event listener
(Inherited from EventDispatcher.) |
![]() | Complete |
The handler which fires when the timer is complete (on the last tick)
|
![]() ![]() | COMPLETE | |
![]() ![]() | DebugMode | |
![]() | Defer()()()() |
Resets time, but not the tick count
|
![]() | Delay |
Delay time in seconds
(seconds because Unity deals with seconds rather than milliseconds)
|
![]() | DispatchEvent(Event, Boolean) |
Dispatches an event with the option of late processing (immediate = TRUE/FALSE)
(Inherited from EventDispatcher.) |
![]() | DispatchEvent(Event) |
Dispatches an event immediatelly
(Inherited from EventDispatcher.) |
![]() | Dispose()()()() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Overrides EventDispatcher.Dispose()()()().) |
![]() | EnqueueEvent(Event) |
Adds an event to the queue
The queue will be processed when ProcessQueue() manually executed
(Inherited from EventDispatcher.) |
![]() | Equals(Object) | (Inherited from Object.) |
![]() | ExecuteListeners(Event) |
Executes event handlers listening for a particular event type
(Inherited from EventDispatcher.) |
![]() | Finalize()()()() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType()()()() | Gets the type of the current instance. (Inherited from Object.) |
![]() | HasBubblingEventListener(String) |
Returns true if there are any subscribers in bubbling hierarchy (Inherited from EventDispatcher.)Override in superclass |
![]() | HasEventListener(String) |
Returns true if EventDispatcher has any registered listeners for a specific type and phase
(Inherited from EventDispatcher.) |
![]() | IsDefaultPrevented(String, Boolean) |
Exposes the cancelable event to the outside if there are listeners for that event type
If default prevented, returns false
If not, returns true
(Inherited from EventDispatcher.) |
![]() | IsDefaultPrevented(String) |
No-bubbling version
(Inherited from EventDispatcher.) |
![]() | IsRunning |
The flag indicating if the timer is running
|
![]() | LastTickTime |
The time the timer had the last tick
|
![]() | MappedToAnyPhase(String, EventHandler, EventPhase) |
Returns true if handler is mapped to any of the specified phases
(Inherited from EventDispatcher.) |
![]() | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | Pause()()()() |
Stops the timer
|
![]() ![]() | PAUSE | |
![]() | ProcessEvent(Event) |
Could be overriden in a subclass (for instance to implement event bubbling)
(Inherited from EventDispatcher.) |
![]() | ProcessQueue()()()() |
If events are added to queue, they are waiting to be fired (Inherited from EventDispatcher.)in the same order they are added |
![]() | RemoveAllListeners(String) |
Removes all listeners for the spacified event type (both capture and bubbling phase)
(Inherited from EventDispatcher.) |
![]() | RemoveAllListeners(String, EventPhase) |
Removes all listeners for the spacified event type and phases
(Inherited from EventDispatcher.) |
![]() | RemoveEventListener(String, EventHandler, EventPhase) |
Removes the event listener
(Inherited from EventDispatcher.) |
![]() | RemoveEventListener(String, EventHandler) |
Removes the event listener
(Inherited from EventDispatcher.) |
![]() | RepeatCount |
Tick in seconds
|
![]() | Reset()()()() |
Resets time and the tick count
|
![]() ![]() | RESET | |
![]() | ResetHandler |
The handler which fires when the timer has been reset
|
![]() | Start()()()() |
Starts the timer
|
![]() | Start(Boolean) |
Starts the timer
|
![]() ![]() | START | |
![]() | StartHandler |
The handler which fires when the timer is started
|
![]() | Stop()()()() |
Stops the timer
|
![]() ![]() | STOP | |
![]() | StopHandler |
The handler which fires when the timer is stopped
|
![]() | Tick |
The handler which fires on each timer tick
|
![]() ![]() | TICK | |
![]() | TickOnStart |
Should the timer tick on start, or after the first delay
|
![]() | ToString()()()() | Returns a string that represents the current object. (Inherited from Object.) |
![]() | UpdateSlot(array<Object>[]()[][]) |
The slot which is being executed on each update
|

Coded by Danko Kozar

Object | ||
![]() | EventDispatcher | |
![]() | Timer |