Interface GameObjectFactory<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Method Detail

      • newArchetype

        @NotNull
        R newArchetype​(@NotNull
                       @NotNull java.lang.String archetypeName)
        Creates a new Archetype instance.
        Parameters:
        archetypeName - the name of the archetype
        Returns:
        the new archetype
      • createGameObject

        @NotNull
        G createGameObject​(@NotNull
                           R archetype)
        Creates a new GameObject from an Archetype.
        Parameters:
        archetype - the archetype
        Returns:
        the new game object
      • createGameObjectPart

        @NotNull
        G createGameObjectPart​(@NotNull
                               R archetype,
                               @Nullable
                               G head)
        Creates a new GameObject from an Archetype.
        Parameters:
        archetype - the archetype
        head - the head part to add to
        Returns:
        the new game object
      • cloneGameObject

        @NotNull
        G cloneGameObject​(@NotNull
                          G gameObject)
        Creates a copy of a game object.
        Parameters:
        gameObject - the game object to copy
        Returns:
        the new game object
      • cloneMultiGameObject

        @NotNull
        G cloneMultiGameObject​(@NotNull
                               G gameObject)
        Creates a copy of a game object, including tail parts. This object must be the head part.
        Parameters:
        gameObject - the game object to copy
        Returns:
        the new game object
      • createInventory

        void createInventory​(@NotNull
                             @NotNull GameObject<G,​A,​R> gameObject,
                             @NotNull
                             @NotNull java.lang.Iterable<G> archetype)
        Copies inventory objects from an archetype into a game object.
        Parameters:
        gameObject - the game object to add to
        archetype - the archetype to copy from