Spin

class Spin<T>(node: Node<T>, reaction: Reaction<T>, environment: Physics2DEnvironment<T>, angularSpeedDegrees: Double) : AbstractAction<T>

Spins a node around itself at angularSpeedDegrees normalized according to the speed of the reaction.

Constructors

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

Functions

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

This method allows to clone this action on a new node. It may result useful to support runtime creation of nodes with the same reaction programming, e.g. for morphogenesis.

Link copied to clipboard
open override fun execute()

Spins the node around itself.

Link copied to clipboard
open override fun getContext(): Context
Link copied to clipboard
override fun getOutboundDependencies(): ListSet
Link copied to clipboard
open override fun toString(): String