DigitalPanManager

class DigitalPanManager<P : Position2D<P>>(speed: Int, period: Long, wormhole: Wormhole2D<P>, updates: () -> Unit)

Manages panning towards a cardinal (N, S, E, W) or intercardinal (NE, NW, SE, SW) direction. When a direction is added, panning towards it begins and doesn't stop until the given direction is removed.

Parameters

speed

The speed of each movement.

period

Amount of time (milliseconds) between each movement.

wormhole

The wormhole used to pan.

updates

A runnable which will be called whenever a panning movement occurs.

Constructors

Link copied to clipboard
fun <P : Position2D<P>> DigitalPanManager(speed: Int = 5, period: Long = 15, wormhole: Wormhole2D<P>, updates: () -> Unit)

Functions

Link copied to clipboard
operator fun minusAssign(direction: Direction2D)

Stops moving towards a certain direction.

Link copied to clipboard
operator fun plusAssign(direction: Direction2D)

Inputs a movement towards a certain direction.