src/core/WeaponSystem.js
/**
	* Shoots at the given position with the current weapon.
	*
	* @param {Vector3} targetPosition - The target position.
	* @return {WeaponSystem} A reference to this weapon system.
	*/
Shoots at the given position with the current weapon.
@param {Vector3} targetPosition - The target position.
@return {WeaponSystem} A reference to this weapon system.
Shoots at the given position with the current weapon . @param { Vector3 } targetPosition - The target position . @return { WeaponSystem } A reference to this weapon system .
shoot( targetPosition ) {
		const currentWeapon = this.currentWeapon;
		const status = currentWeapon.status;
		switch ( status ) {
			case WEAPON_STATUS_EMPTY:
				currentWeapon.reload();
				break;
			case WEAPON_STATUS_READY:
				currentWeapon.shoot( targetPosition );
				break;
			default:
				break;
		}
		return this;
	}
shoot ( targetPosition ) { const currentWeapon = this . currentWeapon ; const status = currentWeapon . status ; switch ( status ) { case WEAPON_STATUS_EMPTY : currentWeapon . reload ( ) ; break ; case WEAPON_STATUS_READY : currentWeapon . shoot ( targetPosition ) ; break ; default : break ; } return this ; }
Shoots at the given position with the current weapon.
Shoots at the given position with the current weapon .