Class CutsceneFactory
java.lang.Object
com.csse3200.game.components.cutscenes.CutsceneFactory
A factory class for creating entities used in cutscenes, such as backgrounds and animations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic EntitycreateAnimation(String animationImgPath, String animName) Creates an animation entity with the specified image path.static EntitycreateBackground(String bgImgPath) Creates a background entity with the specified image path.static EntitycreateFullAnimation(String animationAtlasPath, String animName) Creates a full screen animation entity with the specified atlas path.static EntitycreateImage(String imgPath, float imageScale) Creates an image entity with the specified image path.
-
Method Details
-
createBackground
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
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
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
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.
-