Fix issues from mobile playtesting #5
2 changed files with 0 additions and 26 deletions
No elimination text
commit
b100a75f7d
|
|
@ -3,7 +3,6 @@ import { getDisplayPosition } from './helper/pointer';
|
|||
|
||||
let root: HTMLElement | undefined;
|
||||
let killfeed: HTMLElement | undefined;
|
||||
let elimination: HTMLElement | undefined;
|
||||
|
||||
function ensureRoot(): { root: HTMLElement; killfeed: HTMLElement } {
|
||||
if (!root || !killfeed) {
|
||||
|
|
@ -74,27 +73,8 @@ function killConfirmed(victimName?: string, streak = 1, charge = 0) {
|
|||
}
|
||||
}
|
||||
|
||||
function showElimination(): void {
|
||||
if (elimination) {
|
||||
return;
|
||||
}
|
||||
const { root: r } = ensureRoot();
|
||||
const el = document.createElement('div');
|
||||
el.className = 'elimination';
|
||||
el.innerHTML =
|
||||
'<div class="elimination-title">Eliminated</div>' +
|
||||
'<div class="elimination-sub">Respawning…</div>';
|
||||
r.appendChild(el);
|
||||
elimination = el;
|
||||
}
|
||||
|
||||
function hideElimination(): void {
|
||||
elimination?.remove();
|
||||
elimination = undefined;
|
||||
}
|
||||
|
||||
function resetFeedbackHud(): void {
|
||||
hideElimination();
|
||||
root?.remove();
|
||||
root = undefined;
|
||||
killfeed = undefined;
|
||||
|
|
@ -122,7 +102,5 @@ function escapeHtml(text: string): string {
|
|||
export const FeedbackHud = {
|
||||
hitMarker,
|
||||
killConfirmed,
|
||||
showElimination,
|
||||
hideElimination,
|
||||
reset: resetFeedbackHud,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ export class GameObjectContainer extends CommandReceiver {
|
|||
this.addObject(this.player);
|
||||
localCharacterPredictor.reset();
|
||||
this.game.resendMovement();
|
||||
FeedbackHud.hideElimination();
|
||||
this.wasLocalPlayerAlive = true;
|
||||
},
|
||||
|
||||
|
|
@ -133,9 +132,6 @@ export class GameObjectContainer extends CommandReceiver {
|
|||
|
||||
const player = this.localPlayer;
|
||||
const alive = !!player && player.health > 0;
|
||||
if (this.wasLocalPlayerAlive && !alive) {
|
||||
FeedbackHud.showElimination();
|
||||
}
|
||||
this.wasLocalPlayerAlive = alive;
|
||||
|
||||
if (player) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue