-
Notifications
You must be signed in to change notification settings - Fork 1
Animal details
Phạm Trí Nhân edited this page Sep 10, 2024
·
2 revisions
The Animal details page within How To Play menu provides user with all types of animals they will face within the game.
The menu can be found after clicking on "About Animals" in main How To Play menu.
AnimalDisplay.java
Java class contains all necessary components for the Animals menu.
Texts of description and picture directories are stored in the paragraphs array.
String[] animalDescriptions = {
"Rat - 100 Health, 10 Base Attack, 1 Attack Range, 2 Attack Rate",
"Dog - 300 Health, 20 Base Attack, 1.5 Attack Range, 1 Attack Rate",
"Minotaur - 400 Health, 35 Base Attack, 2 Attack Range, 0.5 Attack Rate",
"Dino - 300 Health, 10 Base Attack, 1.2 Attack Range, 1 Attack Rate",
"Bat - 50 Health, 10 Base Attack, 1 Attack Range, 1.2 Attack Rate",
"Snake - 300 Health, 10 Base Attack, 1 Attack Range, 0.8 Attack Rate",
"Bear - 600 Health, 35 Base Attack, 1.5 Attack Range, 0.5 Attack Rate"
};
String[] animalImagePaths = {
"images/how-to-play/animals/rat.png",
"images/how-to-play/animals/dog.png",
"images/how-to-play/animals/minotaur.png",
"images/how-to-play/animals/dino.png",
"images/how-to-play/animals/bat.png",
"images/how-to-play/animals/snake.png",
"images/how-to-play/animals/bear.png"
};
Components like texts and buttons of the menu are displayed in tables, which makes everything aligned and have the same structure with every other screens. A for loop is used to add every descriptions and pictures into the table:
Table table = new Table();
for (int i = 0; i < animalDescriptions.length; i++) {
Image animalImage = new Image(new Texture(Gdx.files.internal(animalImagePaths[i])));
Label animalLabel = new Label(animalDescriptions[i], skin);
table.add(animalImage).size(75, 70).pad(10);
table.add(animalLabel).pad(10).left().row();
}
return table;
Design Choices
Utilities
Animals
Menus/screens
Character
- Character Animations
- Character's Inventory On Display
- Character's Inventory System
- Character's HealthBar
- Character's Interaction with Items
- Character achievements
- Saving Character
- Player-(and-other-NPC)-invincibility-frames
- Player Factory
- Scoring System
- Test Plan for Inventory System
- Test Plan for Player's Interaction with Items
- Test Plan for Player's Inventory Display
- Test Plan for Saving Character State
- Test Plan for Scoring System
Map
Weapon
- Weapon Overview
- Weapon Types
- Weapon Structure
- Weapon Stats Display
- Testing Plan for Weapon Factory
- Testing Plan for Firing Controller Component
- Testing Plan for Position Tracker Component
- Testing Plan for Weapon Animation Controller component
- Testing Plan for Concrete Melee Weapon class
- Testing Plan for Concrete Ranged Weapon class