-
Notifications
You must be signed in to change notification settings - Fork 4
Entity API
This API is used to define objects that are fixed to the grid, such as buildings, topographical features, etc. Each entity type is a subclass of the Entity class.
You might want to check out Creating Entities and Creating Isometric Graphics.
Used to define a generic entity on the grid.
var entity = new Entity(name, image, point, grid, topographic, visible)Draws the Entity on the grid if Entity.visible is true.
Returns: (float) width of entity's image
Returns: (float) height of entity's image
A human readable name for the entity, e.g "Military Base".
The image for the entity that will be drawn on the grid.
The grid on which the entity exists.
The location of the entity on the grid.
Whether or not the entity is a topographical feature.
Whether or not the entity is to be drawn on the grid.
Methods that only exist in the class and are not added to new objects.
Runs Entity.draw() for each visible entity in the Entity.entities array.
Removes an entity with given name from Entity.entities array.
Returns: (Entity) entity with given name
Returns: (Entity) entity that exists at given point
Properties that only exist in the class and are not added to new objects.
An array of all the entities that have been created.