src/core/UIManager.js
/**
	 * Updates the UI element that displays the frags.
	 *
	 * @return {UIManager} A reference to this UI manager.
	 */
Updates the UI element that displays the frags.
@return {UIManager} A reference to this UI manager.
Updates the UI element that displays the frags . @return { UIManager } A reference to this UI manager .
_updateFragList() {
		const fragMessages = this.fragMessages;
		for ( let i = ( fragMessages.length - 1 ); i >= 0; i -- ) {
			const message = fragMessages[ i ];
			if ( this.currentTime >= message.endTime ) {
				fragMessages.splice( i, 1 );
				const fragList = this.html.fragList;
				fragList.removeChild( message.html );
			}
		}
		if ( fragMessages.length === 0 ) {
			this.html.hudFragList.classList.add( 'hidden' );
		}
		return this;
	}
_updateFragList ( ) { const fragMessages = this . fragMessages ; for ( let i = ( fragMessages . length - 1 ) ; i >= 0 ; i -- ) { const message = fragMessages [ i ] ; if ( this . currentTime >= message . endTime ) { fragMessages . splice ( i , 1 ) ; const fragList = this . html . fragList ; fragList . removeChild ( message . html ) ; } } if ( fragMessages . length === 0 ) { this . html . hudFragList . classList . add ( 'hidden' ) ; } return this ; }
Updates the UI element that displays the frags.
Updates the UI element that displays the frags .
// check for expired messages (new messages are at the end of the array) // remove the visual representation of the frag message // hide html element if there are no elements