Class DefaultGameObjectFactory

    • Constructor Detail

      • DefaultGameObjectFactory

        public DefaultGameObjectFactory​(@NotNull
                                        @NotNull FaceObjectProviders faceObjectProviders,
                                        @NotNull
                                        @NotNull AnimationObjects animationObjects)
        Creates a new instance.
        Parameters:
        faceObjectProviders - the face object providers to use
        animationObjects - 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: GameObjectFactory
        Creates a new Archetype instance.
        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: GameObjectFactory
        Creates a new GameObject from an Archetype.
        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: GameObjectFactory
        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
        public @NotNull GameObject cloneGameObject​(@NotNull
                                                   @NotNull GameObject gameObject)
        Description copied from interface: GameObjectFactory
        Creates a copy of a game object.
        Parameters:
        gameObject - the game object to copy
        Returns:
        the new game object