Implements HP loss HUD button
All checks were successful
Release Creation / build (release) Successful in 41s
All checks were successful
Release Creation / build (release) Successful in 41s
This commit is contained in:
@ -30,9 +30,17 @@ export default class LethalFantasyUtils {
|
||||
if (hpMenu.classList.contains("hp-loss-hud-disabled")) {
|
||||
html.find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-active');
|
||||
html.find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-disabled');
|
||||
html.find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-active');
|
||||
html.find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-disabled');
|
||||
html.find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-active');
|
||||
html.find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-disabled');
|
||||
} else {
|
||||
html.find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
|
||||
html.find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
|
||||
html.find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
|
||||
html.find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
|
||||
html.find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
|
||||
html.find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
|
||||
}
|
||||
})
|
||||
html.find('.loss-hp-hud-click').click((event) => {
|
||||
@ -43,6 +51,10 @@ export default class LethalFantasyUtils {
|
||||
actor.applyDamage(Number(hpLoss));
|
||||
html.find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
|
||||
html.find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
|
||||
html.find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
|
||||
html.find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
|
||||
html.find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
|
||||
html.find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
|
||||
}
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user