-
Notifications
You must be signed in to change notification settings - Fork 117
Entity
Daan van Yperen edited this page Aug 11, 2015
·
50 revisions
Entities are distinct containers of related components.
Entity myEntity = new EntityBuilder(world)
.with(new Pos(10,10), new Anim("Chicken"))
.tag("boss")
.group("enemies")
.build();
- Archetype - Fastest, low level, no parameterized components.
- Entity Factory - Fast, clean and convenient. For fixed composition entities. Requires some setup.
- Edit created entity - Fast, bit verbose. see below.
EntityEdit chickenEdit = entity.edit();
Flaming flaming = chickenEdit.create(Flaming.class);
flaming.strength = 500;
chickenEdit.remove(Freezing.class);
Entity Transmuters allow for high performance edits.
entity.edit().add(new Flaming(500))
Discouraged for games that may require pooling or packing!
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference