CompassEntity

class CompassEntity(val meepMeep: MeepMeep, colorScheme: ColorScheme, width: Double, height: Double, pos: Vector2d) : ThemedEntity, MouseMotionListener

Represents a compass entity in the MeepMeep simulation.

Constructors

Link copied to clipboard
constructor(meepMeep: MeepMeep, colorScheme: ColorScheme, width: Double, height: Double, pos: Vector2d)

Properties

Link copied to clipboard
open override val meepMeep: MeepMeep

The MeepMeep instance.

Link copied to clipboard
open override val tag: String

Tag for the compass entity.

Link copied to clipboard
open override var zIndex: Int

Z-index for rendering order.

Functions

Link copied to clipboard
open override fun mouseDragged(me: MouseEvent?)

Unused mouse dragged event handler.

Link copied to clipboard
open override fun mouseMoved(me: MouseEvent?)

Handles mouse moved events to animate the compass opacity.

Link copied to clipboard
open override fun render(gfx: Graphics2D, canvasWidth: Int, canvasHeight: Int)

Renders the compass on the given graphics context.

Link copied to clipboard
open override fun setCanvasDimensions(canvasWidth: Double, canvasHeight: Double)

Sets the dimensions of the canvas.

Link copied to clipboard

Switches the image used by the compass entity. This function is to be used through MeepMeep.setCompassImage, not directly.

Link copied to clipboard
open override fun switchScheme(scheme: ColorScheme)

Switches the color scheme of the compass.

Link copied to clipboard
open override fun update(deltaTime: Long)

Updates the axes entity.