MovementControllers.MovementController

Description: Abstract class that holds moveable objects and synchronizes positions across them.

Implements: EndGate.IMoveable , EndGate.IUpdateable

Constructors

MovementController (moveables)
Should only ever be called by derived classes.

moveables: EndGate.IMoveable[]
Moveable objects to synchronize.

Fields

Position: EndGate.Vector2d
Gets or sets the position of the MovementController

Velocity: EndGate.Vector2d
Gets or sets the velocity of the MovementController.

Rotation: number
Gets or sets the rotation of the MovementController

Methods

Freeze()
Prevents the MovementController from updating object locations.

Thaw()
Used to re-enable movement within the MovementController.

IsMoving()
Determines if the MovementController is moving. Frozen MovementControllers are not considered moving.

Update()
Synchronizes the current position with all tracked moveable objects. MovementController's must be updated in order to move.

Examples

There's currently no example available for this page. If you'd like to suggest one send me an containing a description, code, and link to the page for the suggested example. As a thanks I'll associate the code snippet with your name directly below the example if approved.