SleepAction

class SleepAction(val dt: Duration) : Action

Constructors

Link copied to clipboard
constructor(dt: Duration)
constructor(dt: Double)
constructor(dt: Duration)

Properties

Link copied to clipboard
Link copied to clipboard
open override val requirements: Set<Any>

The action's requirements (optional). It is up to the action queue to resolve requirements.

Functions

Link copied to clipboard
open override fun delay(dt: Duration): SequentialAction

Returns a new action that waits dt before executing this action.

open override fun delay(dt: Duration): SequentialAction

Returns a new action that waits dt before executing this action.

Link copied to clipboard
open override fun interruptible(onInterruption: Action): Interruptible

Returns an interruptible copy of this action, with onInterruption occurring on interrupt.

open override fun interruptible(onInterruption: InstantFunction): Interruptible

Returns an interruptible copy of this action, with onInterruption occurring on interrupt.

open override fun interruptible(onInterruption: () -> Action): Interruptible

Returns an interruptible copy of this action, with onInterruption occurring on interrupt.

Link copied to clipboard
open override fun preview(fieldOverlay: Canvas)

Draws a preview of the action on canvas fieldOverlay.

Link copied to clipboard
open override fun race(a: Action): RaceAction

Returns a new action that executes this action in parallel with a, but stops both actions when one finishes first.

open override fun race(f: InstantFunction): RaceAction

Returns a new action that executes this action in parallel with f, but stops both actions when one finishes first.

open override fun race(a: () -> Action): RaceAction

Returns a new action that executes this action in parallel with a, but stops both actions when one finishes first.

Link copied to clipboard
open override fun run(p: TelemetryPacket): Boolean

Runs a single uninterruptible block. Returns true if the action should run again and false if it has completed. A telemetry packet p is provided to record any information on the action's progress.

Link copied to clipboard
open override fun then(a: Action): SequentialAction

Returns a new action that executes this action followed by a.

open override fun then(f: InstantFunction): SequentialAction

Returns a new action that executes this action followed by f.

open override fun then(a: () -> Action): SequentialAction

Returns a new action that executes this action followed by a.

Link copied to clipboard
open override fun with(a: Action): ParallelAction

Returns a new action that executes this action in parallel with a.

open override fun with(f: InstantFunction): ParallelAction

Returns a new action that executes this action in parallel with f.

open override fun with(a: () -> Action): ParallelAction

Returns a new action that executes this action in parallel with a.

Link copied to clipboard
open override fun withPreview(preview: Consumer<Canvas>): Action

Returns a copy of this with dashboard preview preview.

open override fun withPreview(preview: (Canvas) -> Unit): Action

Returns a copy of this with dashboard preview preview.

Link copied to clipboard
open override fun withRequirements(vararg reqs: Any): Action

Returns a copy of this with requirements reqs.

open override fun withRequirements(reqs: Set<Any>): Action

Returns a copy of this with requirements reqs.