private void updateAttackCheck ( ) { attacking = false ; attacked = false ; // Check if target is valid; exit if invalid if ( target == null ) { state = AttackState . NONE ; } else { final double dist = UtilMath . getDistance ( transformable . getX ( ) , transformable . getY ( ) , transformable . getWidth ( ) , transformable . getHeight ( ) , target . getX ( ) , target . getY ( ) , target . getWidth ( ) , target . getHeight ( ) ) ; checkTargetDistance ( dist ) ; } }
Update the attack check case .