Skip to content

Commit

Permalink
Use 20 for health/armor meter max
Browse files Browse the repository at this point in the history
  • Loading branch information
JLyne committed Sep 29, 2021
1 parent 770c924 commit 07d851f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/leaflet/icon/PlayerIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class PlayerIcon extends Layer implements Icon<PlayerIconOptions> {
this._playerHealth = document.createElement('meter');
this._playerHealth.className = 'player__health';
this._playerHealth.hidden = true;
this._playerHealth.max = 100;
this._playerHealth.max = 20;

this._playerInfo.appendChild(this._playerHealth);
}
Expand All @@ -129,7 +129,7 @@ export class PlayerIcon extends Layer implements Icon<PlayerIconOptions> {
this._playerArmor = document.createElement('meter');
this._playerArmor.className = 'player__armor';
this._playerArmor.hidden = true;
this._playerArmor.max = 100;
this._playerArmor.max = 20;

this._playerInfo.appendChild(this._playerArmor);
}
Expand All @@ -154,7 +154,7 @@ export class PlayerIcon extends Layer implements Icon<PlayerIconOptions> {
if(this.options.showHealth) {
if (this._player.health !== undefined) {
this._playerHealth!.hidden = false;
this._playerHealth!.value = this._player.health * 5;
this._playerHealth!.value = this._player.health;
} else {
this._playerHealth!.hidden = true;
}
Expand All @@ -163,7 +163,7 @@ export class PlayerIcon extends Layer implements Icon<PlayerIconOptions> {
if(this.options.showArmor) {
if(this._player.armor !== undefined) {
this._playerArmor!.hidden = false;
this._playerArmor!.value = this._player.armor * 5;
this._playerArmor!.value = this._player.armor;
} else {
this._playerArmor!.hidden = true;
}
Expand Down

0 comments on commit 07d851f

Please sign in to comment.