Class Heartbeat
Base class that registers to a tick service and ticks a target callback (when registered)
Implements
Inherited Members
Namespace: Doozy.Runtime.Reactor.Ticker
Assembly: cs.temp.dll.dll
Syntax
public abstract class Heartbeat : IUseTickService
Constructors
Heartbeat(ReactionCallback)
Construct a Heartbeat with a target callback
Declaration
protected Heartbeat(ReactionCallback onTickCallback)
Parameters
Type | Name | Description |
---|---|---|
ReactionCallback | onTickCallback | Target callback |
Properties
deltaTime
Declaration
public double deltaTime { get; }
Property Value
Type | Description |
---|---|
Double |
isActive
Declaration
public bool isActive { get; }
Property Value
Type | Description |
---|---|
Boolean |
lastUpdateTime
Declaration
public double lastUpdateTime { get; set; }
Property Value
Type | Description |
---|---|
Double |
onTickCallback
Callback invoked every time the tick service (this Heartbeat is registered to) ticks
Register to a tick service to Start invoking on every tick
Unregister from the tick service to Stop invoking on every tick
Declaration
public ReactionCallback onTickCallback { get; }
Property Value
Type | Description |
---|---|
ReactionCallback |
timeSinceStartup
Time updater
Declaration
public virtual double timeSinceStartup { get; }
Property Value
Type | Description |
---|---|
Double |
Methods
RegisterToTickService()
Register to a Tick Service to Start ticking the callback
Declaration
public virtual void RegisterToTickService()
Tick()
Tick the target callback
Declaration
public virtual void Tick()
UnregisterFromTickService()
Unregister from the Tick Service to Stop ticking the callback
Declaration
public virtual void UnregisterFromTickService()