waitLeaf

inline fun <E> Task<E>.waitLeaf(seconds: Float, init: Wait<E>.() -> Unit = {}): Int

Creates and adds a Wait to the receiver Task.

Return

the index where the Wait has been added.

Parameters

seconds

the number of seconds to wait for.

init

an optional inline block to configure the Wait.

Type Parameters

E

the type of the receiving task's blackboard.


inline fun <E> Task<E>.waitLeaf(seconds: FloatDistribution = ConstantFloatDistribution.ZERO, init: Wait<E>.() -> Unit = {}): Int

Creates and adds a Wait to the receiver Task.

Return

the index where the Wait has been added.

Parameters

seconds

the FloatDistribution determining the number of seconds to wait for.

init

an optional inline block to configure the Wait.

Type Parameters

E

the type of the receiving task's blackboard.