src/entities/Player.js
/*
	* Adds the given health points to this entity.
	*
	* @param {Number} amount - The amount of health to add.
	* @return {Player} A reference to this game entity.
	*/
Adds the given health points to this entity.
@param {Number} amount - The amount of health to add.
@return {Player} A reference to this game entity.
Adds the given health points to this entity . @param { Number } amount - The amount of health to add . @return { Player } A reference to this game entity .
addHealth( amount ) {
		this.health += amount;
		this.health = Math.min( this.health, this.maxHealth ); 
		this.world.uiManager.updateHealthStatus();
		if ( this.world.debug ) {
			console.log( 'DIVE.Player: Entity with ID %s receives %i health points.', this.uuid, amount );
		}
		return this;
	}
addHealth ( amount ) { this . health += amount ; this . health = Math . min ( this . health , this . maxHealth ) ; this . world . uiManager . updateHealthStatus ( ) ; if ( this . world . debug ) { console . log ( 'DIVE.Player: Entity with ID %s receives %i health points.' , this . uuid , amount ) ; } return this ; }
Adds the given health points to this entity.
Adds the given health points to this entity .
// ensure that health does not exceed maxHealth //