Skip to content

on_phase

fun on_phase(
phase: DayPhase,
behaviour: () -> Unit
)
() -> Unit
Example
fun nightfall(dusk: DayPhase) {
on_phase(dusk) { broadcast("Night falls over the realm.") }
}
on_hour(0) { broadcast("Midnight in the realm.") }
phase: DayPhase

DayPhase