Skip to content

EventInstance

class EventInstance

A triggered event.

EventInstance objects are created when an Event is triggered. They represent the lifetime of that event at that particular time.

The internal state of an EventInstance is owned by that EventInstance, that means each time you trigger an Event, a new instance with its own state is created.

See
Event

Functions

Name Description
~EventInstance Default constructor.
AdvanceFrame Applies a frame update on this Event.
IsRunning Returns whether this EventInstance is running.
Abort Aborts the execution of this Event.

Function Details

Abort

virtual void Abort() = 0

Aborts the execution of this Event.

AdvanceFrame

virtual void AdvanceFrame(AmTime deltaTime) = 0

Applies a frame update on this Event.

This method is called once per frame to update the event instance's state.

Parameter deltaTime
The time elapsed since the last frame.

Warning

This method is for internal usage only.

IsRunning

[[nodiscard]] virtual bool IsRunning() const = 0

Returns whether this EventInstance is running.

Return
true if the event is running, false otherwise.

~EventInstance

virtual ~EventInstance() = default

Default constructor.