Move Forward And Teleport
class MoveForwardAndTeleport<T, P : Position2D<P>?> : AbstractMoveNode<T, P>
Content copied to clipboard
Moves the node along the x axis up to coordinate getMaxX, with steps of size getDeltaX. Once getMaxX is reached, the nodes gets teleported back to getMinX. Somewhat, it mimics the movement a node would have in a cylindrical environment.
Parameters
<T>
Concentration type
<P>
Position type
Constructors
Link copied to clipboard
open fun MoveForwardAndTeleport(environment: Environment<T, P>, node: Node<T>, deltaX: Double, minX: Double, maxX: Double)
Content copied to clipboard
Functions
Link copied to clipboard
open fun cloneAction(node: Node<T>, reaction: Reaction<T>): MoveForwardAndTeleport<T, P>
Content copied to clipboard
Link copied to clipboard
Detects if the move is in absolute or relative coordinates, then calls the correct method on the Environment.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
How to override: if you intend your action to influence any reaction with compatible context, return null.