-
Notifications
You must be signed in to change notification settings - Fork 9
MAIN MENU AND SETTING MENU DISPLAY CHANGES
The MainMenuDisplay and class is a UI component responsible for displaying the main menu of the game. It allows users to navigate and interact with various menu options. This documentation focuses on adding static images to run an animation the main menu.
- In the MainMenuDisplay class, static images are added which runs as an animation to enhance the visual appeal of the main menu. Here's how it's done:
- In the SettingsMenuDisplay class, images are added to enhance the visual appeal of the main menu. Here's how it's done:
- This is the final output of the Main Menu screen Display
- This is the Final output of the Settings Screen Display
create() The create method is called during component creation and is responsible for setting up the main menu's UI elements, including the title image and menu buttons
In the MainMenuDisplay
class, we have a method called AmendAnimation()
. This method is responsible for animating the main menu screen. Here's a breakdown of how it works:
-
frame
is a variable that keeps track of the current animation frame. -
MainMenuScreen.MountedFrames
is the total number of frames in the animation. -
transitionFrames
is an object that represents the animation frame being displayed. -
lastFrameTime
stores the time when the last frame was updated.
This method is called to update the animation frame. It does the following:
- Checks if the current frame is less than the total number of frames.
- If yes, it updates
transitionFrames
with the next frame's texture. - Sets the dimensions of
transitionFrames
to match the screen size. - Advances the frame counter and updates
lastFrameTime
. - If all frames have been shown, it resets
frame
to 1.
- LibGDX: The core framework for developing cross-platform games.
-
Yash Mittal @YashMitttal
-
Aniket Gupta @aniketgupta17
Escape Earth Game
Interaction Controller and Interactable Components
Game and Entity Configuration Files
Loading Game Configuration Files