Event

sealed interface Event<P>

Represents an event that can trigger an action. Events can be either autonomous (triggered by time or conditions) or manual (triggered by user input).

Parameters

P

the type of parameter to supply when the event triggers

Inheritors

Types

Link copied to clipboard
sealed interface AutonomousEvent<P> : Event<P>
Link copied to clipboard
sealed interface ManualEvent<P> : Event<P>

Properties

Link copied to clipboard
abstract val parameter: P

the parameter associated with the event

Functions

Link copied to clipboard
abstract fun shouldTrigger(): Boolean