BattleUI
As mentioned previously, BludBourne uses a simple interface for fighting monsters, inspired from the first person's perspective of Dragon Warrior. The following screenshot (Figure 9) represents the individually labeled components of the BattleUI
class:
The BattleUI
class is composed primarily of an AnimatedImage
custom class and a Table
with action TextButton
widgets used by the player during the battle. The BattleUI
window is configured so that the player's StatusUI
is always on top, which gives the player access to their inventory so that they can equip items or use consumables during battle. The StatusUI
also indicates the current HP and MP left.
We will now walk through the source of the BattleUI
implementation, which can be found at core\src\com\packtpub\libgdx\bludbourne\UI\BattleUI.java
:
package com.packtpub.libgdx.bludbourne.UI; import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.Touchable; import com.badlogic.gdx.scenes.scene2d...