Skip to content
Daan van Yperen edited this page Aug 11, 2015 · 3 revisions

Fastest way of changing entity component compositions. Primarily useful when bootstrapping entities over several different managers/systems or when dealing with many entities at the same time (lightweight particle systems etc).

// initialize to a field
this.transmuter = new EntityTransmuterFactory(world)
			.add(Sprite.class)
			.add(Renderable.class)
			.remove(AssetReference.class)
			.build();

// apply transformation to entity
this.transmuter.transmute(entity);
Clone this wiki locally