Class CutsceneFactory

java.lang.Object
com.csse3200.game.components.cutscenes.CutsceneFactory

public class CutsceneFactory extends Object
A factory class for creating entities used in cutscenes, such as backgrounds and animations.
  • Method Details

    • createBackground

      public static Entity createBackground(String bgImgPath)
      Creates a background entity with the specified image path. The background will be scaled to fit the screen and centered on the screen.
      Parameters:
      bgImgPath - The file path of the background image to use.
      Returns:
      A new background entity.
    • createAnimation

      public static Entity createAnimation(String animationImgPath, String animName)
      Creates an animation entity with the specified image path. The entity will have a texture component for rendering the animation. Creates an animation called "idle" which is the only possible
      Parameters:
      animationImgPath - The file path of the animation image to use.
      animName - The name of the animation that will be played.
      Returns:
      A new animation entity.
    • createImage

      public static Entity createImage(String imgPath, float imageScale)
      Creates an image entity with the specified image path. The entity will have a texture component for rendering the image.
      Parameters:
      imgPath - The file path of the animation image to use.
      Returns:
      A new animation entity.
    • createFullAnimation

      public static Entity createFullAnimation(String animationAtlasPath, String animName)
      Creates a full screen animation entity with the specified atlas path.
      Parameters:
      animationAtlasPath - The file path of the atlas file to use.
      animName - The name of the animation in the atlas file.
      Returns:
      A new animation entity.