CameraInjectVisibleNodeClosestToDistance

class CameraInjectVisibleNodeClosestToDistance(reaction: NodeReaction<Any>, environment: Physics2DEnvironment<Any>, distance: Double, visionMolecule: Molecule, targetMolecule: Molecule) : AbstractLocalAction<Any> (source)

Given a list of VisibleNode associated to visionMolecule, it finds the closest to a point located at distance from the node owning this action in the direction of its heading, and injects its position in targetMolecule.

If there are no VisibleNodes, targetMolecule will be removed from the node.

Constructors

Link copied to clipboard
constructor(reaction: NodeReaction<Any>, environment: Physics2DEnvironment<Any>, distance: Double, visionMolecule: Molecule, targetMolecule: Molecule)

Properties

Link copied to clipboard
override val reaction: NodeReaction<Any>
Link copied to clipboard

Functions

Link copied to clipboard
override fun cloneAction(newReaction: Reaction<Any>): Action<Any>
Link copied to clipboard
open override fun execute()
Link copied to clipboard
open override fun toString(): String