ChangeTargetOnCollision

abstract class ChangeTargetOnCollision<T, P : Position<P>>(getCurrentPosition: () -> P) : TargetSelectionStrategy<T, P>

Base class for TargetSelectionStrategy offering automatic target change on collision and utilities for initialization. getCurrentPosition should return the current position of the object to move. P is the position type to use.

Constructors

Link copied to clipboard
constructor(getCurrentPosition: () -> P)

Functions

Link copied to clipboard
abstract override fun cloneIfNeeded(destination: Node<T>?, reaction: Reaction<T>?): ChangeTargetOnCollision<T, P>
Link copied to clipboard
open override fun getTarget(): P