Update entities.js

Added swing boolean parameter.
function attack(target, swing)