MobileEntity:
Filter:
GameLoop/Classes (extension) | Class

MobileEntity
ExtensionExtension

An entity that can move

Description

A mobile entity is an entity that can have a velocity.

Class Methods

.new

Create a new mobile entity

Arguments:

world

an instance of EntityManager

position

an instance of RealVector2D

radius

radius in meters

mass

a number/float

collisionType

a symbol for the collision type /free, /mobile or /static

velocity

an instance of RealVector2D

Instance Methods

.velocity

.update

Integration of the position based on the velocity and the relevant forces.

.force

Get or pass in a force. A RealVector2D