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