@Override
    public void update() {
        super.update();
        
        if(isActivated()) {
            if(canFire)
            {
                //target the closest mob
                Monster m = registry.getMonsterManager().getClosestWithinMax(getCenterPoint(), MAX_RANGE);
                if(m != null) {
                    if(m.getMapX() > mapX) {
                        facingRight = true;
                    } else {
                        facingRight = false;
                    }
                    
                    registry.getProjectileManager().createProjectile(registry.getPlayerManager().getCurrentPlayer(),
                            "Arrow",
                            20,
                            new Point(
                            getMapX(),
                            getMapY()),
                            new Point(
                            m.getCenterPoint().x,
                            m.getCenterPoint().y),
                            true,
                            true,
                            false,
                            70);
                    canFire = false;
                    recastTotalTime = 0;
                } else {
                    facingRight = true;
                }
            } else {
                long p = registry.getImageLoader().getPeriod();
                recastTotalTime = (recastTotalTime
                        + registry.getImageLoader().getPeriod())
                        % (long) (1000 * RECAST_TIME * 2);

                if ((recastTotalTime / (RECAST_TIME * 1000)) > 1) {
                    canFire = true;
                    recastTotalTime = 0;
                }
            }
        }
    }