HeadTowardTarget

class HeadTowardTarget<T> @JvmOverloads constructor(node: Node<T>, environment: Physics2DEnvironment<T>, reaction: Reaction<T>, target: Molecule, angularSpeedDegrees: Double = 360.0) : AbstractAction<T> (source)

Reads the target's absolute coordinates from the target molecule contained in node and sets the node's heading accordingly.

Constructors

Link copied to clipboard
constructor(node: Node<T>, environment: Physics2DEnvironment<T>, reaction: Reaction<T>, target: Molecule, angularSpeedDegrees: Double = 360.0)

Properties

Link copied to clipboard
open override val context: Context
Link copied to clipboard
@get:Nonnull
override val outboundDependencies: ListSet<out Dependency?>

Functions

Link copied to clipboard
open override fun cloneAction(node: Node<T>, reaction: Reaction<T>): HeadTowardTarget<T>
Link copied to clipboard
open override fun execute()

Sets the heading of the node according to the target molecule.

Link copied to clipboard
open override fun getContext(): Context