public void action() {
        BoundBox r;
        r = new BoundBox(
                entity.boundingBox.x,
                entity.boundingBox.y,
                entity.sprite.getWidth(),
                entity.sprite.getHeight());
        entity.setBounds(r);
        entity.location = new Point2D.Double(r.getCenterX(), r.getCenterY());
        for (AI ai : taskList) {
            if (ai.execute()) {
                break;
            }
        }
        if (!entity.isPlayer) {
            if (entity.direction > 0) {
                entity.setSprite(ImageManipulator.selectFromSheet(
                        entity.spriteSheet,
                        entity.spritenumber,
                        entity.spriteSize.x,
                        entity.spriteSize.y));
            } else if (entity.direction < 0) {
                entity.setSprite(ImageManipulator.flipImage(
                        ImageManipulator.selectFromSheet(
                        entity.spriteSheet,
                        entity.spritenumber,
                        entity.spriteSize.x,
                        entity.spriteSize.y)));
            }
        }
    }