Register an event that finishes before the begin of current one.

delay indicates the time between the end of the new event and the begin of the current one. Use 0.0 if both event should be contiguous and not overlap.

Returns the new event information that can be used in fluent programming.

Property definitions

event_queue $ EventInfo :: add_before
	# Register an event that finishes before the begin of current one.
	#
	# `delay` indicates the time between the end of the new event and the begin of the current one.
	# Use 0.0 if both event should be contiguous and not overlap.
	#
	# Returns the new event information that can be used in fluent programming.
	fun add_before(event: E, delay: Float, duration: nullable Float): EventInfo[E]
	do
		duration = duration or else 0.0
		return queue.add_at(event, start - delay - duration, duration)
	end
lib/event_queue/event_queue.nit:334,2--344,4