-
Notifications
You must be signed in to change notification settings - Fork 27
Entity
Benedikt S. Vogler edited this page Aug 22, 2017
·
8 revisions
An entity is an object which is not bound to the grid. Entities may move around (MovableEntitiy).
Entities must derive from com.bombinggames.wurfelengine.core.AbstractEntity.
They can be spawned to the map with the method
spawn(Point point)
Enemy enemy = (Enemy) new Enemy().spawn(new Coordinate(5,5,5).getPoint());
To remove the from the game you call dispose()
. If you just want to remove them from the map call removeFromMap()
.
By default entities use sprite category 'e'. Sprite of entities with an id 0-9 are reserved by the engine. Here is a list of the entities currently used by the engine.
- invisible stuff
- not in use
- not in use
- destruction decals
- not in use
- benchmark ball
- shadow
- sprites on the ground like gras and stones
- cursor
- cursor normal
You can register entities in order to spawn them from the map editor.
AbstractEntity.registerEntity(String name, Class<? extends AbstractEntity> entityClass)
;