public interface GameObjectFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
GameObject
instances.Modifier and Type | Method and Description |
---|---|
G |
cloneGameObject(G gameObject)
Creates a copy of a game object.
|
G |
cloneMultiGameObject(G gameObject)
Creates a copy of a game object, including tail parts.
|
G |
createGameObject(R archetype)
Creates a new GameObject from an
Archetype . |
G |
createGameObjectPart(R archetype,
G head)
Creates a new GameObject from an
Archetype . |
void |
createInventory(@NotNull GameObject<G,A,R> gameObject,
@NotNull java.lang.Iterable<G> archetype)
Copies inventory objects from an archetype into a game object.
|
R |
newArchetype(@NotNull java.lang.String archetypeName)
Creates a new
Archetype instance. |
@NotNull R newArchetype(@NotNull @NotNull java.lang.String archetypeName)
Archetype
instance.archetypeName
- the name of the archetype@NotNull G createGameObject(@NotNull R archetype)
Archetype
.archetype
- the archetype@NotNull G createGameObjectPart(@NotNull R archetype, @Nullable G head)
Archetype
.archetype
- the archetypehead
- the head part to add to@NotNull G cloneGameObject(@NotNull G gameObject)
gameObject
- the game object to copy@NotNull G cloneMultiGameObject(@NotNull G gameObject)
gameObject
- the game object to copyvoid createInventory(@NotNull @NotNull GameObject<G,A,R> gameObject, @NotNull @NotNull java.lang.Iterable<G> archetype)
gameObject
- the game object to add toarchetype
- the archetype to copy from