API Docs for:
Show:

Position Class

A component class which holds a position of an entity. The position is the center point of the entity.

Constructor

Position

(
  • x
  • y
)

Parameters:

  • x Number

    The x component of the position.

  • y Number

    The y component of the position.

Item Index

Methods

getPosition

(
  • vector
)

Parameters:

  • vector Vector2D

    Vector to which the position will be copied.

setPosition

(
  • x
  • y
)

Parameters:

  • x Number

    The x component of the new position.

  • y Number

    The y component of the new position.