public class DefaultGameObjectFactory extends AbstractGameObjectFactory<GameObject,MapArchObject,Archetype>
GameObjectFactory
to create
Crossfire related game objects.Constructor and Description |
---|
DefaultGameObjectFactory(@NotNull FaceObjectProviders faceObjectProviders,
@NotNull AnimationObjects animationObjects)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
@NotNull GameObject |
cloneGameObject(@NotNull GameObject gameObject)
Creates a copy of a game object.
|
@NotNull GameObject |
createGameObject(@NotNull Archetype archetype)
Creates a new GameObject from an
Archetype . |
@NotNull GameObject |
createGameObjectPart(@NotNull Archetype archetype,
@Nullable GameObject head)
Creates a new GameObject from an
Archetype . |
@NotNull Archetype |
newArchetype(@NotNull java.lang.String archetypeName)
Creates a new
Archetype instance. |
cloneMultiGameObject, createInventory
public DefaultGameObjectFactory(@NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull AnimationObjects animationObjects)
faceObjectProviders
- the face object providers to useanimationObjects
- the animation objects for looking up animations@NotNull public @NotNull Archetype newArchetype(@NotNull @NotNull java.lang.String archetypeName)
GameObjectFactory
Archetype
instance.archetypeName
- the name of the archetype@NotNull public @NotNull GameObject createGameObject(@NotNull @NotNull Archetype archetype)
GameObjectFactory
Archetype
.archetype
- the archetype@NotNull public @NotNull GameObject createGameObjectPart(@NotNull @NotNull Archetype archetype, @Nullable @Nullable GameObject head)
GameObjectFactory
Archetype
.archetype
- the archetypehead
- the head part to add to@NotNull public @NotNull GameObject cloneGameObject(@NotNull @NotNull GameObject gameObject)
GameObjectFactory
gameObject
- the game object to copy