-
Notifications
You must be signed in to change notification settings - Fork 0
Player UI
The player UI contains elements that describe the current state of the game for the player. Currently, these contain the current 'level' the player is on and their health as floating text.
The current implementation of health in the game is just a number. The health bar will be extended to be a bar that depletes as the health of the player decreases and fills when (if) the players' health increases. The players' health will be reset to full if they change to a new level, or restart the level. The HP bar function is base on the percentage
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 ();
Create the pixmap
to import the texture
the game need.
public static Pixmap pixmap = new Pixmap(3,1, Pixmap.Format.RGBA8888);
public static Texture pixmaptex = new Texture(pixmap);
public static TextureRegion h= new TextureRegion(pixmaptex);
After creating the asset manager we need to load the images we need to the manager.
The AssetManager
Class provides a function to help you add the resource to the manager.
This is an example to load a texture to the manager
manager.load("images/file.png", Texture.class);
Remember you need to tell the manager you finished load all the resources.
manager.finishLoading();
Set the HP images to above the Character and make changes with the Health number.
The first thing to do is get the current health percentage.
double health = entity.getComponent(CombatStatsComponent.class).getHealth();
double hp = health / entity.getComponent(CombatStatsComponent.class).getMaxHealth();
Then let's make the image of the hp bar change with the health in Draw Method.
if (hp>0.9){
textureRegion.setTexture(manager.get("images/100.png", Texture.class));
batch.draw(textureRegion,entity.getPosition().x-1, entity.getPosition().y+1);
}
- 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