-
Notifications
You must be signed in to change notification settings - Fork 1
Damage buff and speed stats UI
This UI element is for items that are "Buff Items" (effect is applied immediately upon pickup). The reason that this was created was because these items do not get added to inventory, therefore making it difficult to know exactly what item did to the player, especially if it appears as a mystery box. In addition, since buff item effects are stackable (eg. an energy drink will apply an additional boost to the current speed), it is difficult for the player to keep track of the "boosts" that they have so far. Therefore, the objective of the UI element of the items is to resolve these issues, by showing the player's current stats of the buff items effects, which will update upon picking up an item. The progress bar should also set to the correct amount if the player saves and loads the game.
This progress bar, represented by an energy drink icon, shows the player's current speed boost accumulated so far. It is updated through the following...
- Upon creating a PlayerStatsDisplay component, a listener is created to activate the
updateSpeedPercentageUI
method of this class, when the "updateSpeedPercentage" event is triggered - The speed progress bar is set in PlayerStatsDisplay. As such, it calls upon
getSpeedProgressBarProportion
of PlayerActions, to get the player's speed as a proportion of the original, base speed. This calculation finds if there is any additional speed boost that has been added to the player's speed (this may be the case if a game is saved with speed boosts, then subsequently loaded). The progress bar is then set to this value. The speed progress bar also has a set animation of 2.0f (which allows the progress bar to increase slower whenever it is updated) - Upon pickup, the
effect()
method of the EnergyDrink class is called, which calculates the new speed (in the form of a Vector2) and the new speed boost that the character has accumulated. The new speed boost accumulated is also calculated using thegetSpeedProgressBarProportion
of PlayerActions, which gets the new speed as a proportion of the base speed. - The event "updateSpeedPercentage" is triggered from the
effect()
method, passing in the new updated speed percentage and speed type of the energy drink. - As explained above, the
updateSpeedPercentageUI
method of the PlayerStatsDisplay class is called, which sets the value of the progress bar to the new updated speed percentage
This process is similar to the above, however, the event "updateDamageBuff" is instead triggered.
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