@Override
    public void update() {
        super.update();
        if(flinching){
            long elapsed = (System.nanoTime() - flinchTimer) / 1000000;
            if(elapsed > 400) flinching = false;
        }
        
        if(right && dx == 0){
            right = false;
            left = true;
            facingRight = right;
        }else if(left && dx == 0){
            right = true;
            left = false;
            facingRight = right;
        }
        
        animation.update();
    }