local inbeans = false;

function onCreate()
setProperty('camGame.bgColor', 'FlxColor.WHITE');
end

function onBeatHit()

end

function onStepHit()

    if curStep == 640 then
        setProperty('defaultCamZoom',0.9);
        inbeans = true;
    end

    if inbeans == false then
        if mustHitSection == false then
            triggerEvent('Camera Follow Pos',450, 350);
            setProperty('defaultCamZoom',1.1);
        else 
            triggerEvent('Camera Follow Pos',800, 350);
            setProperty('defaultCamZoom',1.1);
        end
    else
        triggerEvent('Camera Follow Pos',640, 360);
    end   

end

function onUpdate(elapsed)    
    DALAPSED = elapsed/0.016;
    if curStep > 640 and getProperty('defaultCamZoom') > 0.9 then
        setProperty('defaultCamZoom',getProperty('defaultCamZoom')-0.0005*DALAPSED);
    end
    setProperty('gf.alpha', 0);
    makeLuaSprite('sky','nate fg',0, 0);
    setLuaSpriteScrollFactor('sky', 1, 1);
end