-
Notifications
You must be signed in to change notification settings - Fork 0
Current buff Display
Su LAN edited this page Sep 13, 2021
·
1 revision
Use AssetManager
to create a manager to manage the Texture. Assets are reference counted. This also means that if you load an asset several times, it will only take up memory once!
public static AssetManager manager = new AssetManager ();
this.player = ((ForestGameArea) currentMap).getPlayer();
Provides an interface that allows us to get the player's current buffs
public Collection<BuffInformation> current_buff(){
return this.timedBuffs.values();
}
Set the side length of the square image to 0.4f, each iteration will be the Texture in order to appear above the player.
Get the current buff through the interface provided by registerBuff.java
Collection<BuffInformation> buffs = entity.getComponent(BuffManager.class).test();
float i = 0f;
for (BuffInformation buff:buffs) {
if(Objects.equals(buff.getType().toString(), "BT_INVIN")){
batch.draw(manager.get("images/ghostKing.png", Texture.class),player.getPosition().x+1.2f-i, player.getPosition().y+1.7f,0.4f,0.4f);
}
if (Objects.equals(buff.getType().toString(), "DT_GIANT")){
batch.draw(manager.get("images/winReplay.png", Texture.class),player.getPosition().x+1.2f-i, player.getPosition().y+1.7f,0.4f,0.4f);
}
if (Objects.equals(buff.getType().toString(), "DT_NO_JUMP")){
batch.draw(manager.get("images/box_boy.png", Texture.class),player.getPosition().x+1.2f-i, player.getPosition().y+1.7f,0.4f,0.4f);
}
if (Objects.equals(buff.getType().toString(), "BT_INF_SPRINT")){
batch.draw(manager.get("images/box_boy.png", Texture.class),player.getPosition().x+1.2f-i, player.getPosition().y+1.7f,0.4f,0.4f);
}
if (Objects.equals(buff.getType().toString(), "DT_DOUBLE_DMG")){
batch.draw(manager.get("images/pauseRestart.png", Texture.class),player.getPosition().x+1.2f-i, player.getPosition().y+1.7f,0.4f,0.4f);
}
if (Objects.equals(buff.getType().toString(), "B_FULL_HEAL")){
batch.draw(manager.get("images/heart.png", Texture.class),player.getPosition().x+1.2f-i, player.getPosition().y+1.7f,0.4f,0.4f);
}
i+=0.4f;
}
- Player UI
- Popup Menus
- Obstacles
- Boss Enemies
- Progress Tracker
- Checkpoint Design and Functionality
- Score System
- Lives System
- Game Background
- Multiple game-level
- Visual Improvements
- Tutorial Level
- Character Design and Animations
- Character Damage Animations
- Player Animation Functionalities
- Player and Serpent Portal Transition
- Pop-up Menus
- Obstacles
- Lives & Score User Testing
- Buffs & Debuffs
- Buffs & Debuffs redesign
- Obstacle Animation
- Background Design
- Level 2 Background Appearance
- Enemy Monster User Testing
- Level 1 Floor Terrain Testing
- Introduction Screens User Testing
- Character Movement Interviews & User Testing
- Sound user testing
- Level 2 Obstacles and enemy
- Story, Loading, Level 4 and Win Condition Sound Design User Testing
- Giant Bug and Purple Squid animation user testing
- General Gameplay and Tutorial Level User Testing
- Level 4 Terrain User Testing
- Game Outro User Testing