Entity
serves as a base class for game elements in devkit. It provides functionality for coordinates in a game-space; circular and rectangular bounds for offsetting views and hitboxes; implicit view management; basic physics including velocity, acceleration, and collisions; and a lifecycle interface to easily facilitate pooling.
Run this command to install devkit-entities as a dependency in your project:
devkit install https://github.com/gameclosure/devkit-entities.git
Once installed, you can import classes from this module like this:
import entities.Entity as Entity;
We use JSDoc to generate documentation, here's the latest: devkit-entities docs.
Open source examples built on devkit with this module:
- Scene.js (devkit-entities v0.5.0)
- Drone Swarm (devkit-entities v0.2.4)