var ogZoom = 1;

function onCreate()
{
	ogZoom = defaultCamZoom;
	
	FlxG.camera._fxFadeAlpha = 1;
	FlxG.camera._fxFadeColor = FlxColor.BLACK;
	camHUD.alpha = 0;
}

function onCountdownStarted()
{
	for (i in opponentStrums)
		i.x = -1000;
}

function onMoveCamera(char)
{
	if (char == 'dad') defaultCamZoom = ogZoom * 1.2;
	else defaultCamZoom = ogZoom;
}

function onSongStart()
{
	FlxG.camera.zoom += 1;
	camFollow.y -= 700;
	FlxG.camera.snapToTarget();
	FlxTween.tween(FlxG.camera, {_fxFadeAlpha: 0, zoom: ogZoom * 1.2}, 4.3, {ease: FlxEase.sineIn});
	FlxTween.tween(camFollow, {y: camFollow.y + 700}, 3, {ease: FlxEase.sineIn});
}

function onEvent(ev, v1, v2, time)
{
	if (ev == '' && v1 == 'showHUD')
	{
		FlxTween.tween(camHUD, {alpha: 1}, 0.7);
	}
	
	if (ev == 'Add Camera Zoom')
	{
		FlxTween.cancelTweensOf(FlxG.camera);
	}
}
