Package net.sf.gridarta.model.gameobject
Class AbstractGameObjectFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.model.gameobject.AbstractGameObjectFactory<G,A,R>
-
- All Implemented Interfaces:
GameObjectFactory<G,A,R>
- Direct Known Subclasses:
AbstractIsoGameObjectFactory,DefaultGameObjectFactory
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>
Abstract base class forGameObjectFactoryimplementations.
-
-
Constructor Summary
Constructors Constructor Description AbstractGameObjectFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GcloneMultiGameObject(G gameObject)Creates a copy of a game object, including tail parts.voidcreateInventory(@NotNull GameObject<G,A,R> gameObject, @NotNull java.lang.Iterable<G> archetype)Copies inventory objects from an archetype into a game object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.gridarta.model.gameobject.GameObjectFactory
cloneGameObject, createGameObject, createGameObjectPart, newArchetype
-
-
-
-
Method Detail
-
cloneMultiGameObject
@NotNull public G cloneMultiGameObject(@NotNull G gameObject)
Description copied from interface:GameObjectFactoryCreates a copy of a game object, including tail parts. This object must be the head part.- Specified by:
cloneMultiGameObjectin interfaceGameObjectFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
gameObject- the game object to copy- Returns:
- the new game object
-
createInventory
public void createInventory(@NotNull @NotNull GameObject<G,A,R> gameObject, @NotNull @NotNull java.lang.Iterable<G> archetype)Description copied from interface:GameObjectFactoryCopies inventory objects from an archetype into a game object.- Specified by:
createInventoryin interfaceGameObjectFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
gameObject- the game object to add toarchetype- the archetype to copy from
-
-