-
Notifications
You must be signed in to change notification settings - Fork 1
Animal Selection Screen ‐ for Land, Water , Air Kingdoms
The Animal Selection Screen - for Land, Water , Air Kingdoms class is a specialised screen in the game, designed to allow the user to select the respective animals based on the kingdoms. This class extends the AnimalSelectionScreen
, inheriting common functionality while specifying the display components needed for air animal selections.
package com.csse3200.game.screens;
public class AirAnimalSelectionScreen extends AnimalSelectionScreen
This screen is a subclass of the abstract AnimalSelectionScreen. It overrides the abstract method createDisplay to provide a display specific to air animals.
public AirAnimalSelectionScreen(GdxGame game) {
super(game);
}
The constructor accepts an instance of GdxGame and passes it to the superclass, initializing the screen for air animal selection.
createDisplay(Stage stage, Skin skin)
@Override
protected AnimalSelectionDisplay createDisplay(Stage stage, Skin skin) {
return new Air/Land/Water-AnimalSelectionDisplay(stage, skin);
}
This method overrides the abstract createDisplay method from AnimalSelectionScreen to return an instance of AirAnimalSelectionDisplay, which defines the visual representation of the air animal selection.
stage
: The stage on which the display will be drawn.
skin
: The UI skin used for styling the components.
A new instance of Air/Land/Water-AnimalSelectionDisplay, which manages the selection of animals.