public abstract class AbstractGameObjectFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements GameObjectFactory<G,A,R>
GameObjectFactory
implementations.Constructor and Description |
---|
AbstractGameObjectFactory() |
Modifier and Type | Method and Description |
---|---|
G |
cloneMultiGameObject(G gameObject)
Creates a copy of a game object, including tail parts.
|
void |
createInventory(GameObject<G,A,R> gameObject,
java.lang.Iterable<G> archetype)
Copies inventory objects from an archetype into a game object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cloneGameObject, createGameObject, createGameObjectPart, newArchetype
@NotNull public G cloneMultiGameObject(@NotNull G gameObject)
cloneMultiGameObject
in interface GameObjectFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
gameObject
- the game object to copypublic void createInventory(@NotNull GameObject<G,A,R> gameObject, @NotNull java.lang.Iterable<G> archetype)
createInventory
in interface GameObjectFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
gameObject
- the game object to add toarchetype
- the archetype to copy from