-
Notifications
You must be signed in to change notification settings - Fork 114
Archetype
DaanVanYperen edited this page Sep 20, 2014
·
7 revisions
Archetypes provide a reusable blueprint for new entities. Archetypes have a performance benefit.
Work in progress. Support pre- and post creation parameterized components, serialization and archetype composition planned for future versions. See ticket #104 for further discussion.
Archetype chickenArchetype =
new ArchetypeBuilder()
.add(Pos.class)
.add(Anim.class)
.add(Bounds.class)
.build(world);
Entity chicken = world.createEntity(chickenArchetype);
Archetype flamingChickenArchetype =
new ArchetypeBuilder(chickenArchetype)
.add(Flaming.class)
.build(world);
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference