Class DefaultGameObjectFactory
- java.lang.Object
-
- net.sf.gridarta.model.gameobject.AbstractGameObjectFactory<GameObject,MapArchObject,Archetype>
-
- net.sf.gridarta.var.crossfire.model.gameobject.DefaultGameObjectFactory
-
- All Implemented Interfaces:
GameObjectFactory<GameObject,MapArchObject,Archetype>
public class DefaultGameObjectFactory extends AbstractGameObjectFactory<GameObject,MapArchObject,Archetype>
TheGameObjectFactoryto create Crossfire related game objects.
-
-
Constructor Summary
Constructors Constructor Description DefaultGameObjectFactory(@NotNull FaceObjectProviders faceObjectProviders, @NotNull AnimationObjects animationObjects)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull GameObjectcloneGameObject(@NotNull GameObject gameObject)Creates a copy of a game object.@NotNull GameObjectcreateGameObject(@NotNull Archetype archetype)Creates a new GameObject from anArchetype.@NotNull GameObjectcreateGameObjectPart(@NotNull Archetype archetype, @Nullable GameObject head)Creates a new GameObject from anArchetype.@NotNull ArchetypenewArchetype(@NotNull java.lang.String archetypeName)Creates a newArchetypeinstance.-
Methods inherited from class net.sf.gridarta.model.gameobject.AbstractGameObjectFactory
cloneMultiGameObject, createInventory
-
-
-
-
Constructor Detail
-
DefaultGameObjectFactory
public DefaultGameObjectFactory(@NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull AnimationObjects animationObjects)Creates a new instance.- Parameters:
faceObjectProviders- the face object providers to useanimationObjects- the animation objects for looking up animations
-
-
Method Detail
-
newArchetype
@NotNull public @NotNull Archetype newArchetype(@NotNull @NotNull java.lang.String archetypeName)
Description copied from interface:GameObjectFactoryCreates a newArchetypeinstance.- Parameters:
archetypeName- the name of the archetype- Returns:
- the new archetype
-
createGameObject
@NotNull public @NotNull GameObject createGameObject(@NotNull @NotNull Archetype archetype)
Description copied from interface:GameObjectFactoryCreates a new GameObject from anArchetype.- Parameters:
archetype- the archetype- Returns:
- the new game object
-
createGameObjectPart
@NotNull public @NotNull GameObject createGameObjectPart(@NotNull @NotNull Archetype archetype, @Nullable @Nullable GameObject head)
Description copied from interface:GameObjectFactoryCreates a new GameObject from anArchetype.- Parameters:
archetype- the archetypehead- the head part to add to- Returns:
- the new game object
-
cloneGameObject
@NotNull public @NotNull GameObject cloneGameObject(@NotNull @NotNull GameObject gameObject)
Description copied from interface:GameObjectFactoryCreates a copy of a game object.- Parameters:
gameObject- the game object to copy- Returns:
- the new game object
-
-