Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void drawHPOrb() {
- int health;
- String cHP = ""+currentStats[3]+"";
- cHP = cHP.replaceAll("%", "");
- int currentHP = Integer.parseInt(cHP);
- String mHP = ""+maxStats[3]+"";
- mHP = mHP.replaceAll("%", "");
- int maxHP2 = Integer.parseInt(mHP);
- health = (int) (((double) currentHP / (double) maxHP2) * 100D);
- emptyOrb.drawSprite(170, 13);
- if (health <= 100 && health >= 75) {
- smallText.method382(65280, 213, cHP, 39, true);
- } else if (health <= 74 && health >= 50) {
- smallText.method382(0xffff00, 213, cHP, 39, true);
- } else if (health <= 49 && health >= 25) {
- smallText.method382(0xfca607, 213, cHP, 39, true);
- } else if (health <= 24 && health >= 0) {
- smallText.method382(0xf50d0d, 213, cHP, 39, true);
- }
- hitPointsFill.drawSprite(173, 16);
- double percent = (health / 100D);
- fillHP = 27 * percent;
- int depleteFill = 27 - (int) fillHP;
- deplete.myHeight = depleteFill;
- deplete.height = depleteFill;
- deplete.drawSprite(173, 16);
- hitPointsIcon.drawSprite(179, 24);
- }
Add Comment
Please, Sign In to add comment